The 17-year-old Israeli-born Canadian was defaulted after hitting a ball into the face of chair umpire Arnaud Gabas, handing Britain's Kyle Edmund a 6-3, 6-4, 2-1 triumph that gave Britain a 3-2 victory in the first-round tie at Ottawa.
"It was a strange way to finish," Edmund said. "I've never been part of something like that."
Britain advanced to a quarterfinal match-up on April 7-9 against France with that winner facing either Spain or Serbia in a September semifinal.
Gabas suffered bruising and swelling around his left eye and was taken to a nearby hospital.
Shapovalov apologised to Gabas in the referee's office while he was being treated, and was contrite in a press conference.
"I would like to begin with apologising to that umpire, the referee and to all ITF officials. It was unacceptable behavior from me," said Shapovalov, who was frustrated at losing a point, took a ball from his pocket and hit it wildly to send it flying into Gabas's face.
"I feel incredibly ashamed and embarrassed, for letting my team down and my country down. That's the last time I'm going to do anything like that. I'm going to learn from it."
Vasek Pospisil had blasted 25 aces in a 7-6 (7/3), 6-4, 3-6, 7-6 (7/5) victory over Dan Evans after three hours and 23 minutes earlier to draw Canada level at 2-2, setting the stage for the final drama.
Pospisil took to Twitter to defend his young teammate.
"No one is nicer or carries themselves better for a 17 y/o than Shapovalov," Pospisil tweeted. "Everyone can see that today was an accident. Can happen to anyone."