It was the final game of the regular season for both teams.
Terry put Anaheim up 5-4 with a power-play goal at 17:06. Mikael Granlund sent a shot on net and Terry pounced on the rebound and lifted it over the left pad of Juuse Saros from in front.
Granlund had three assists for the Ducks (43-33-6), who were 1-6-2 in their previous nine games. John Carlson had two assists, and Ville Husso made 17 saves.
Steven Stamkos had two goals and an assist, and Filip Forsberg scored twice for the Predators (38-34-10), who have lost three of their final four games. Luke Evangelista and Ryan Ufko each had two assists, and Saros made 35 saves.
Forward Cole O'Hara, who was selected by Nashville in the fourth round (No. 114) of the 2022 NHL Draft, had an assist and one shot on goal in 11:23 of ice time in his NHL debut after being recalled from Milwaukee of the American Hockey League earlier in the day.
The Predators have already been eliminated from playoff contention.
Cutter Gauthier gave the Ducks a 1-0 lead 1:36 into the first period. Ryan Poehling skated into the offensive zone and fed a backdoor cross-crease pass to Gauthier, who buried a snap shot over Saros' left pad from the right face-off circle.
Stamkos tied it 1-1 at 10:09, taking a pass from O'Hara in the left circle and burying a snap shot past Husso's glove.
Forsberg put Nashville up 2-1 with a power-play goal at 15:55 when he tipped Ufko's pass in the slot and the puck rolled in off the right pad of Husso.
Jackson Lacombe tied it 2-2 at 19:39, roofing a snap shot from the blue line through traffic.
Alex Killorn put Anaheim ahead 3-2 at 4:33 of the second period when his one-timer from the right boards beat a screened Saros to the blocker side.
Forsberg evened the scored 3-3 at 14:37, snapping a shot into the top right corner for his 40th goal of the season.
Stamkos gave the Predators a 4-3 lead while on the power play just 46 seconds later at 15:23. He lifted a backdoor feed from Ryan O'Reilly over Husso's blocker below the left circle.
Tristan Luneau tied it 4-4 at 4:17 of the third period when he finished the rebound off a Granlund chance with a wrist shot from in tight as he crashed the net.