The Portuguese midfielder fired home from 20 yards after he and Michael Stewart had cut open the retreating Kilmarnock defence just after the hour mark on Saturday.
Killie had enjoyed the upper hand but David Fernandez and Danny Invincibile squandered glorious chances, and Christos Karipidis finished them off with a late header.
The victory moved Hearts level on points with third-placed Dundee United, who host Motherwell on Sunday.
Kilmarnock slipped five points below Hibernian as their home form continues to undermine their top-six hopes - this was their seventh defeat in eight games at Rugby Park.
Aguiar, making his first appearance of 2009 following a minor injury, was one of five players coming into a Hearts team hit by injuries to Janos Balogh and Ruben Palazuelos and the suspension of defenders Lee Wallace and Marius Zaliukas.
Kilmarnock had Alan Combe, Mehdi Taouil and Simon Ford back in their starting line-up following injury and suspension and they had the better of the first half.
Neither goalkeeper faced much threat in the first quarter as Kilmarnock failed to find the killer pass to complement their possession.
Hearts were struggling to build attacks as they played into the wet and windy conditions, but Killie survived a mild scare when Combe missed the ball after coming for Andrew Driver's arrowed corner.
Ford cleared well as Combe struggled with another Driver delivery into the heart of his goalmouth, and Hearts defended brilliantly from a corner moments later as they blocked shots from Frazer Wright, Craig Bryson and Invincibile inside the penalty area.
Aguiar and Driver both shot about 20 yards wide following half-cleared corners and Fernandez was equally inaccurate as he squandered a glorious chance.
Allan Russell dispossessed Christophe Berra midway inside the Hearts half and Bryson quickly slid the ball through for Fernandez, but the Spaniard shot high and well wide from the edge of the box with only McDonald to beat.
Killie soon missed another great opportunity. Garry Hay set up Invincibile with a back-post cross but the unmarked Australian headed wide from six yards.
Manuel Pascali was on target with a last-minute header but he had little chance of generating enough power from Invincibile's cross and McDonald made a comfortable diving save.
Hearts looked more promising going forward immediately after the restart but their 61st-minute opener was still their first incisive move of the game.
Stewart burst forward and exchanged passes with Aguiar before slipping the ball inside to the Portuguese midfielder, who fired into the corner of the net.
Killie had an instant chance to level but Russell sliced wide after Hay's cross had missed everyone else out, and the striker then headed the ball away from goal after Invincibile had helped a corner into the danger area.
However, their fightback fizzled out and Karipidis put Hearts out of sight in the 80th minute. Berra headed Stewart's free-kick back across goal and the Greek midfielder headed down and into the net from six yards.
McDonald ensured he kept a clean sheet when he got down well to parry sub Willie Gibson's volley and Hearts otherwise held out without much concern.
They may even have added to their lead but Combe blocked well from Christian Nade after Pascali's misplaced pass had set up the Hearts striker.