A tremendous cross from Silvester van der Water went toward net and toward a streaking Nani, as the striker found the space past his defender to convert the winning score.
It was the eighth goal of the season for Nani, who didn't play in the Lions' last game due to injury.
Orlando City (8-4-4, 28 points) twice trailed in the game but equalized on two other headers. Kyle Smith scored his first career MLS goal just before the end of the first half, and van der Water scored five minutes after entering the game as a 74th-minute substitute.
Atlanta United's franchise-record winless drought stretched to 11 games (0-5-6).
Martinez scored just 47 seconds into game, tying his own record for the fastest goal ever scored by an Atlanta United player. It was Martinez's third goal of the season, and his eighth in as many career games against Orlando.
Goalkeeper Mason Stajduhar earned the win in his first career MLS game as the Lions academy product started in place of the injured Pedro Gallese. Stajduhar made one save and had no chance on either of Atlanta's brilliant finishes, including Moreno's 66th-minute strike.
The Lions are 3-0-3 in six games against Atlanta since the start of the 2020 season.
Dating back to last season, Atlanta United are 0-7-6 in their past 13 road games.