The invention discloses a lock with a power connecting function. The lock is composed of a male plug 
assembly and a female plug 
assembly, the male plug 
assembly comprises a male plug rear shell, a male plug front shell, a gear driving mechanism, a middle gear, two male plug bolts, two male plug bolt 
electrode connectors, two reset springs and a male plug 
signal electrode connector, and the femaleplug assembly comprises a female plug shell and two female plug 
electrode connectors; the male plug bolts comprise of sliding parts, transmission parts, locking parts, and 
electric wire connecting contact points correspondingly; and the two bolts are arranged in the inner space of the male plug assembly, the 
electric wire connecting contact points and the locking parts are exposed out of the innerspace of the male plug assembly, the gear driving mechanism is arranged in the middle of the male plug rear shell, the middle gear is arranged on the gear driving mechanism, the middle gear is meshedwith the transmission parts, and the male plug bolt electrode connectors are arranged on the male plug bolts correspondingly. Compared with existing similar locks, the lock has the advantages of being good in 
synchronism, stable in power connection, not easy to wear, long in service life, small in size, strong in applicability and the like.