The present invention relates to the technical field of electric power, in particular to an anti-misplug socket and plug-in for computer equipment. The anti-misplug socket and plug-in comprises a shell, first electromagnets are fixedly connected to the inner walls at the two sides of the shell, and piston grooves are formed in the inner walls of the two sides of the shell; piston blocks are movably connected to the outer sides of the piston grooves, the inner walls of the piston blocks are fixedly connected with magnetic blocks, and the inner sides of the piston blocks are fixedly connected with springs; the inner sides of the springs are fixedly connected with clamping blocks movably connected with the inner walls of the piston grooves, the inner walls of the clamping blocks are fixedly connected with second electromagnets, and damping holes are evenly distributed in the outer side of the clamping blocks. According to the anti-misplug socket and plug-in for computer equipment, throughthe cooperative use of the clamping blocks and the clamping grooves, after a plug-in block is inserted into the shell, the clamping blocks move towards the inner side under the magnetic attraction effect of the electromagnet II and a magnetic conductive block, so that the clamping blocks are inserted into the clamping grooves, the plug-in block is effectively prevented from falling off, the anti-misplug effect is achieved, the stable use of a desktop computer is effectively guaranteed, and the practicality and stability are improved.