A locking mechanism for applying in a computer case is disclosed. The locking mechanism comprises: an actuating unit and a locking member. The actuating unit is pivotally connected to one of two vertically-disposed side plates of the computer case by one end thereof, and comprises a pivot member and a latching member. In the present invention, the actuating unit rotates along a first direction parallel to the vertically-disposed side plate, so as to decrease space required by operating the locking mechanism. Such that the locking mechanism brought advantages of great space-saving, high capacity and low cost of production cost.