The home side took the lead in ten minutes when Gregor Henry got the touchdown at the back of a rolling maul, with Frazier Climo converting from the touchline.
Hawick withstood the hosts’ efforts to increase their lead before hitting back in 25 minutes through Andy Mitchell, with Lee Armstrong levelling with the conversion.
Ayr hit straight back via a Stafford McDowall try before Robbie Nairn powered over for a third try. Climo added the extras to make it 21-7 at the interval.
Climo and Steven Longwell set-up David Corbineci for Ayr’s bonus-point try in 42 minutes.
The home side then saw off a Hawick fight-back before, with Bruce McNeil on the naughty step after bringing down an advancing maul, McDowall carved through for try number five. It was converted by Climo, who then went six from six from the tee after debutant prop Craig Miller scored a hack-and-chase try.
It was a good win for the youthful Ayr side to consolidate top spot in the Tennent’s Premiership.