On 7 April 1868, McGee participated in a parliamentary debate that went on past midnight. After finishing, he walked back to the boarding house where he was staying. McGee was opening the door to Mrs. Trotter's Boarding House in Ottawa when he was shot in the head by someone waiting for him on the inside. Several people came running to the scene; however, there was no sign of the assassin. It was later determined that McGee was assassinated with a shot from a handgun by Patrick J. Whelan. McGee was given a state funeral in Ottawa known to be the one of the largest funerals in Canadian history and interred in a crypt at the Cimetière Notre-Dame-des-Neiges in Montreal. His funeral procession in Montreal drew an estimated crowd of 80,000 (out of a total city population of 105,000).