Marchand scored 3:30 into overtime, lifting Boston to a 2-1 victory over the Columbus Blue Jackets on Saturday.
"Yeah, I kind of wanted, was hoping to score just to do it before the game," Marchand said of copying McGregor's entrance into the ring. "It's not every day you have an icon here in the room. I just wanted to have a little fun with it."
McGregor spoke to the team before the game and after.
"He's an incredible guy, very energetic," Marchand said. "He was humble. He was happy to be here. He's expressed that to everyone. It was an honor to meet him. It was great to have him here. It's something we'll remember."
The win snapped Boston's three-game losing streak that came after it earned at least a point in 19 straight games. Patrice Bergeron had a power-play goal for the Bruins and set up the winner.
Bergeron spun around and fed Marchand in the right circle, where Marchand one-timed a shot as he went to one knee for his 15th OT goal, most in team history. Then the winger did a little shimmy -- with his arms moving back and forth -- as he skated toward the bench before he was mobbed by his teammates.
"It goes to that chemistry," Bergeron said. "We know where each other are going to be on the ice mostly at all times."