An optical connector comprising: an optical receptacle and an optical plug configured to be attached and detached, wherein the optical receptacle includes a plurality of receptacle-side connector modules, each receptacle-side connector module including an outer housing, an inner housing, a receptacle-side ferrule housed in the inner housing, a movement regulation part provided on a surface of the outer housing and a receptacle-side spring that applies pressure to the receptacle-side ferrule, the optical plug includes a plurality of plug-side connector modules, each plug-side connector module including a plug-side housing, a plug-side ferrule housed in the plug-side housing, and a plug-side spring that applies pressure to the plug-side ferrule, each inner housing includes an engagement section and a pair of catch pawl parts provided on upper and lower surfaces of the inner housing and facing the movement regulation part and locked thereby, each Lhc plug-side housing includes an engaged section, and, in a state where the engagement section engages with the engaged section, the inner housing and the plug-side housing have a predetermined positional relationship, and the receptacle-side ferrule and the plug-side ferrule but against each other with predetermined pressure by the receptacle-side spring and the plug-side spring, each plug-side housing includes an unlocking section, and, when the unlocking section causes an unlocked state from a locked state where the inner housing is locked by the outer housing, the inner housing is made movable with respect to the outer housing by freeing the movement regulation part from the catch pawl parts, and, when the optical receptacle and the optical plug are connected to each other, in a state where each engagement section engages with the corresponding engaged section after the locked state shifts to the unlocked state in each receptacle-side connector module and each plug-side connector module, each inner housing and each plug-side housing move in a direction of attaching and detaching with respect to the respective outer housing, wherein the optical receptacle includes a receptacle-side cylindrical part including a screw part formed on an outer surface, and the optical plug includes a nut part into which the receptacle-side cylindrical part is screwed, and the locked state shifts to the unlocked state by advancing screwing of the receptacle-side cylindrical part into the nut part and elastically deforming the catch pawl parts toward the receptacle-side ferrule side, the catch pawl parts being elastically deformed by the respective unlocking section. an optical receptacle and an optical plug configured to be attached and detached, wherein the optical receptacle includes a plurality of receptacle-side connector modules, each receptacle-side connector module including an outer housing, an inner housing, a receptacle-side ferrule housed in the inner housing, a movement regulation part provided on a surface of the outer housing and a receptacle-side spring that applies pressure to the receptacle-side ferrule, the optical plug includes a plurality of plug-side connector modules, each plug-side connector module including a plug-side housing, a plug-side ferrule housed in the plug-side housing, and a plug-side spring that applies pressure to the plug-side ferrule, each inner housing includes an engagement section and a pair of catch pawl parts provided on upper and lower surfaces of the inner housing and facing the movement regulation part and locked thereby, each Lhc plug-side housing includes an engaged section, and, in a state where the engagement section engages with the engaged section, the inner housing and the plug-side housing have a predetermined positional relationship, and the receptacle-side ferrule and the plug-side ferrule but against each other with predetermined pressure by the receptacle-side spring and the plug-side spring, each plug-side housing includes an unlocking section, and, when the unlocking section causes an unlocked state from a locked state where the inner housing is locked by the outer housing, the inner housing is made movable with respect to the outer housing by freeing the movement regulation part from the catch pawl parts, and, when the optical receptacle and the optical plug are connected to each other, in a state where each engagement section engages with the corresponding engaged section after the locked state shifts to the unlocked state in each receptacle-side connector module and each plug-side connector module, each inner housing and each plug-side housing move in a direction of attaching and detaching with respect to the respective outer housing, wherein the optical receptacle includes a receptacle-side cylindrical part including a screw part formed on an outer surface, and the optical plug includes a nut part into which the receptacle-side cylindrical part is screwed, and the locked state shifts to the unlocked state by advancing screwing of the receptacle-side cylindrical part into the nut part and elastically deforming the catch pawl parts toward the receptacle-side ferrule side, the catch pawl parts being elastically deformed by the respective unlocking section.