Alfredsson reached the milestone at 3:31 of overtime to cap Ottawa's come-from-behind 4-3 win over the Calgary Flames on Friday night.
The Senators' longtime captain drove a slap shot from the left point past Leland Irving on a power play after Calgary was left short-handed when Rene Bourque was called for holding 2:20 into the extra period.
"To be able to do this at home and in overtime, when everybody's still in the building and being a big goal for us, it's almost too good to be true," said the 39-year-old Swedish right wing, who was "too mobbed" by his teammates to get a look at a replay on Scotiabank Place's new HD video scoreboard.
Alfredsson's 400th goal was his 1,050th point in his 1,088th regular-season game -- all team records.
"We're really happy for Alf," said center Jason Spezza, who was on the ice for the milestone. "To score his 400th goal is a huge milestone, and to do it in overtime, in a dramatic game -- we were down three goals, at home, with his family here, I think we were all pretty happy for him and just excited as teammates."
Erik Karlsson, who assisted on Alfredsson's goal, tied it at 3 with an unassisted effort 4:28 into the third as Ottawa battled back from an early 3-0 deficit.
Karlsson picked up his own rebound and circled behind the net with a delayed penalty signaled against Calgary. The smooth-skating defenseman came out the other side to score his fifth goal.
"I think when we stepped out on the ice as a different team in the second, and especially in the third," Karlsson said. "We battled back, and in overtime we went for the win and we weren't scared of losing the game."
"We know we didn't have it for a full 60 (minutes) tonight," said Irving, who made 45 saves in his third NHL start.
Senators backup Alex Auld allowed three goals on 15 shots in his sixth start.
Craig Anderson took over to start the second and got his 16th win in relief. He stopped each of the 17 shots he faced.
Calgary ended a four-game winning streak one night earlier with a road loss to the New York Islanders.
"We'll take the point here tonight -- it's a big point -- but when you have a team up like that you've got to close the deal," Flames coach Brent Sutter said.
Jarome Iginla failed to score for a second game in a row. The Calgary captain remains two goals shy of becoming the 42nd member of the league's 500-goal club.
Foligno drew the Senators within 3-1 early in the second. The Senators' left wing crashed the goal to scored his 11th goal 3:34 into the middle period on a scoring play that was upheld by a video review.
Smith cut the deficit to 3-2 with his 11th at 12:01.
Irving kept his right pad extended along the ice to prevent Kyle Turris from stuffing in a rebound moments later.
Jay Bouwmeester had a scoring chance early in the third that could have put Calgary ahead by two, but the defenseman's stick broke as he shot.
Bourque got credit for his 12th goal as Calgary took a 1-0 lead on an odd scoring play 23 seconds in. Auld played the puck behind his net and sent it past Senators defenseman Sergei Gonchar. Bourque cut it off along the boards and his shot from the left corner struck Turris' skate on its way through Auld.
Glencross made it 2-0 with his team-leading 15th goal on a power play at 6:25.
Butler increased the lead to 3-0 at 18:49 with his first goal in 39 games with the Flames.
Butler has six goals in 194 regular season games. He was acquired from Buffalo along with C Paul Byron in the June 25 trade that sent Robyn Regehr, Ales Kotalik and a second-round draft pick in 2012 to the Sabres. ... The Flames are in the midst of a seven-game road trip as Calgary hosts the world junior hockey championship. ... The crowd of 20,500 was the Senators' 11th sellout in 20 home games.