Lincolnshire rider Hickman worked his way through from fourth position early on to take victory by 0.533 seconds from eight-time winner Michael Rutter.
Both riders were aboard Bathams SMT BMWs, with Martin Jessopp a close third on his Riders' Motorcycles Kawasaki.
Debutant Irwin made it a four-way fight at the front until pulling in late on.
Media playback is not supported on this device
The Carrickfergus rider had qualified in an impressive third position on his first appearance at the 3.8-mile Guia circuit, behind pole setter Jessopp and Rutter.
Rutter was the early leader of the 12-lap race, before fellow Englishman Jessopp hit the front, but Hickman worked his way through to the front to take victory.
Be Wiser Ducati mounted Irwin was second in the early stages and also occupied third and fourth positions, but was forced to retire with mechanical problems at the start of the final lap.
Media playback is not supported on this device
Manxman Conor Cummins, Austrian Horst Saiger and Scot Stuart Easton, a former winner of the event, made up the top six, followed by John McGuinness in seventh and Tyco BMW pilot Ian Hutchinson eighth.
Republic of Ireland rider Derek Sheils was ninth on his debut at the race for John Burrows' Cookstown BE Racing team.
Jessopp set the fastest lap of the race, which was the 50th running of the event.
Peter Hickman won the Macau Grand Prix for the second year in succession as Northern Ireland's Glenn Irwin retired while battling for a podium place.