A bracket mechanism includes a connecting wall and a mounting device. The mounting device and the connecting wall are movable relative to each other to be in a locking state or an unlocking state. The mounting device includes at least one mounting member. When the mounting device and the connecting wall are in the locking state, the at least one mounting member is adjacent to the connecting wall to be closed relative to each other. When the mounting device and the connecting wall are in the unlocking state, the at least one mounting member is away from the connecting wall to be opened relative to each other.