An electronic device includes a casing and an expansion card. The casing includes a chassis and an installation frame. The installation frame is pivotably disposed on the chassis. The expansion card is fixed to the installation frame. The expansion card is movable along with the installation frame so as to be located in the chassis or at least partially located outside the chassis.