A transmission device for a wheelchair with a rehabilitation function includes a first transmission shaft, a second transmission shaft coaxial to the first transmission shaft, and a sliding member. The first transmission shaft includes a first engaging portion. The second transmission shaft includes a driving section. The sliding member is mounted around the driving section to permit synchronous rotation. The sliding member has a second engaging portion and is slideable between a transmission position in which the second engaging portion engages with the first engaging portion and a release position in which the second engaging portion disengages from the first engaging portion. A wheelchair includes two transmission devices associated with two rear wheels and two footrests. The footrests can be actuated when the rear wheels move.