A slide rail mechanism includes a supporting frame, a bracket, a fastening member and an elastic member. The bracket and the supporting frame are movable relative to each other. The bracket includes a longitudinal wall and at least one mounting member adjacent to the longitudinal wall. The fastening member is transversely movable relative to the bracket. The elastic member is configured to provide an elastic force to the fastening member. When the supporting frame is moved relative to the bracket from a first position to a second position, the supporting frame is configured to drive the fastening member to transversely move from a first operating position to a second operating position.