The 22-year-old Orica-Scott rider was boxed in with about 300 metres remaining but burst through a gap next to the rails and crossed the line ahead of world champion Peter Sagan, who was caught up in the bunch and left his final spurt too late.
Team Sky sprinter Danny van Poppel made an audacious bid for victory from almost one kilometre out but the Dutchman was captured and passed within sight of the line and had to settle for a third-place finish.
Overall leader Richie Porte of Australia finished safely in the pack to hold on to his 20-second advantage over Spain's Gorka Izagirre, who raced with bandages on his arm and leg after crashing heavily on Thursday.
BMC Racing rider and overall leader Richie Porte of Australia poses on the podium after stage four of the Tour Down Under cycling race from Norwood to Campbelltown near Adelaide on January 20, 2017.
Image credit: AFP
Colombian climber Estaban Chaves is a further two seconds adrift with two stages remaining in the first event on the 2017 UCI WorldTour calendar.
Friday's 149.5km stage was a loop through the Adelaide Hills from Norwood to Campbelltown and New Zealand's Jack Bauer made a brave bid for a solo win before he was reeled in with four km remaining as the sprint teams drove the peloton.
As the pace quickened in the closing kilometre, the diminutive Ewan made sure he was always near the front of the pack and raised his arms in delight as he crossed the line for his sixth win of the campaign.
Orica-Scott rider Caleb Ewan of Australia (centre L) wins ahead of Bora-Hansgrohe rider Peter Sagan of Slovakia (R) in stage four of the Tour Down Under cycling race from Norwood to Campbelltown near Adelaide on January 20, 2017.
Image credit: AFP
"I couldn't have asked for a better start to the year," he told reporters.
Saturday's penultimate stage finishes with a gruelling climb to the finish up Willunga Hill, where Chaves, Izagirre and the other leading climbers will hope to put pressure on Porte, who is seeking his first victory in the race.
The event finishes in Adelaide on Sunday.