The invention discloses a camera module, a periscopic camera module, a camera assembly and an electronic device, and belongs to the technical field of intelligent equipment. The camera module comprises a fixing piece, a lens assembly, an image sensor and a focusing assembly, and the image sensor is used for receiving light passing through the lens assembly. In the focusing assembly, a first lightturning piece is used for turning light in the process of transmitting the light from the lens assembly to the image sensor, and a second light turning piece is used for turning the light turned by the first light turning piece and is configured to move relative to the fixing piece so as to change the distance of the light transmitted from the lens assembly to the image sensor. According to the invention, the distance between the first light turning piece and the second light turning piece is adjusted, the distance of the propagation path of the light between the lens assembly and the image sensor can be adjusted, the focusing of the lens assembly is completed, the imaging of the image sensor is realized, and the length of the camera module in the optical axis direction of the lens assembly is shortened.