The invention relates to a camera module, which includes a casing, a focus mechanism, a lens module, an anti-shake mechanism, a flexible circuit board and a base. The focusing mechanism includes a carrier, upper shrapnel, lower shrapnel, focusing coil, and upper magnet. The carrier includes an upper mounting plate, a lower mounting plate, and a lens assembly barrel. The anti-shake mechanism includes a guide rod, a lower magnet, and an anti-shake coil. The base protrudes upwards to form a guide. Rod mounting plate, the guide rod mounting plate is provided with a first conduction hole, the lower mounting plate protrudes upwards to form an auxiliary positioning wall, the auxiliary positioning wall is provided with a second conduction hole, and the guide rod is passed through the second conduction hole Inside, the two ends of the guide rod respectively pass through the first through hole, one end of the spring abuts against the outer side wall of the guide rod mounting plate, and the other end abuts against the inner surface of the side wall of the housing. The present invention adopts the above-mentioned structure to realize focusing and anti-shake functions, has a simple structure, and does not use a suspension wire structure, so no special materials are used, which saves costs.