In this paper, we successfully construct the universal quantum gate for Shor’s algorithm and derive the cost of this quantum circuit to estimate the complexity. The circuit we design to implement Shor’s algorithm’s first complete quantum circuit rather than a simplified circuit. This is important that the quantum circuit design proposed in this paper can decompose larger composite numbers directly if the hardware can be improved in the future. Although the time and space complexity are still greater than traditional computers, it proves that Shor’s algorithm can be implemented in quantum computers.