The invention discloses a lifting key and an expansion and folding method. When a cover body or a handle is closed, the key is in a compressed state, the cover body or the handle of the device is opened, the cover body or the handle releases a traction mechanism, and a movable plate is driven by self elasticity of the key to move; after the movable plate moves, the locking state between the movable plate and an X balance frame is released, the X balance frame is unfolded under effects of a reset mechanism, and the key is restored to a normal height; the cover body or the handle is slowly closed, a traction mechanism pulls the movable plate under effects of the cover body or the handle, the movable plate moves backwards to the initial position, the movable plate and the X balance frame areclamped at the time, and the key changes to a compressed state. According to the automatic lifting key, the key can be automatically unfolded when opening, the key is automatically retracted when closing, the space height is small when closing, and a laptop or a Bluetooth keyboard is thinner and easier to carry.