A method and apparatus for electromechanically locking a docking station to a computer using an electromagnetic attractive force is disclosed. In a preferred embodiment, the docking station includes a latching mechanism with a ferromagnetic handle, and an electromagnet proximately located to the latching mechanism. The latch mechanically secures the docking station to the PC. The electromagnet is positioned such that, when electrically energized, the electromagnetic field produced thereby attracts the handle with sufficient force to prevent the handle from being used to disconnect the PC from the docking station. Alternatively, the electromagnet can be located in the docking station so that it is near a ferromagnetic plate in the PC when the PC is docked. The electromagnet is positioned such that, when electrically energized, the electromagnetic field produced thereby attracts the plate with sufficient force so as to physically lock the plate to the electromagnet, thereby locking the PC to the docking station.