A parking space lock specifically comprises a power output socket 1, a vehicle identification camera 2, a power input socket 3, a solar panel 4, a storage battery 5, an ultrasonic distance sensor 6, an LED indicator lamp 7, a parking space lock main body 8 (including a processor, a micro-motor, a network base band or a chip, a positioning chip, a storage chip, an electric power metering chip) anda parking space lock undercarriage 9. According to the method, the network connection of the parking space lock is realized through the parking space lock main body 8. The parking space information publishing, the parking demand reception, parking data storage are realized through mobile phone software. The vehicle identification camera 2 recognizes the information of a vehicle license plate and feeds the information back to the parking space lock main body 8 for on-line verification. The ultrasonic distance sensor 6 senses the vehicle distance and feeds the information back to parking space lock main body 8 for opening and closing the parking space lock undercarriage 9. The solar panel 4 or the power input socket 3 are used to charge the storage battery 5 or store energy for the storage battery 5, and the power output socket 1 is used to charge a chargeable vehicle. The ultrasonic distance sensor 6 senses the distance to a vehicle or an object and feeds the information back to the parking space lock main body 8. The parking space lock main body 8 controls a sounding device and the micro-motor in the parking space lock main body 8 to realize voice alarm and opening/closing of the parking space lock undercarriage 9.