A front housing of the optical-electrical composite connector is axially provided with a through groove passing through the front housing on the front housing, and an inner wall of the through groove is provided with a first groove. A rear housing includes a main body portion and a clamping portion connected to one end of the main body portion. An outer surface of the clamping portion is axially provided with a second groove, the clamping portion is located in the through groove, and the first groove is butted with the second groove to form an accommodation space. One end that is of the through groove and that is away from the main body portion is an optical port. The font housing is provided with an opening connecting to the accommodation space and the outside. The conductive terminal is accommodated in the opening, and the conductive terminal forms an electrical port.