A drug injection device comprises a main body case, a drug syringe mounting component, a piston, a drive mechanism, a controller, and means for locking the lid during operation of the drug injection device. The main body case has a lid and a base and an injection needle let-in/let-out opening. The drug syringe mounting component is provided inside the main body case, and allows a (filled) drug syringe to be mounted therein. The piston is movable with respect to the drug syringe mounting component. The drive mechanism drives the drug syringe mounting component and the piston. The controller is electrically connected to the drive mechanism. The means for locking the lid during operation of the drug injection device is activated and deactivated by movement of the drug syringe mounting component when the lid is closed.