1. Shift the gear selector into gear 7.
2. Disconnect the motor harness at the yellow arrow/letter A in the picture below. Also cut the ziptie holding the harness to the frame.
3. Loosen the axle nuts. You most likely have to remove the rubber cap on each side first.
4. Once the axle nuts are loosened, the wheel will come out to the bottom of the drop outs.
Installation is the reverse of removal. A tip for installation is to do it with the bicycle upside down. This way you can line up the rotor into the disc brake caliper while also lining up the axle without fighting the weight of the wheel.