The invention discloses a system and method for automatically loading and unloading goods in a vending machine. The goods are stored in a layering mode, a plurality of goods channels are formed in each layer and driven by motors, and infrared emission receiving devices are installed. A lifting pick-up cabin, an electrically operated gate and infrared emission receiving devices are arranged in an automatic vending machine goods container cabin. A RFID card reader, a bar code reader, a man-machine interface touch screen, a biometric feature recognition device and a network management platform are further installed on the vending machine. Due to the mode of full-automatic loading and unloading, when a door of the machine is opened, internal cold and heat energy losses are avoided, an operator is prevented from making contact with cash, and in combination with electronic commerce network shopping, the system and method improve efficiency of physical distribution, are convenient to use and rapid, keep warm, save energy and are advanced in technology.