Brentford goalkeeper Daniel Bentley saved Aluko's initial shot but the winger followed up from close range to give Fulham a deserved half-time lead.
The Bees did not register a single shot on goal in the first period.
Ex-Brentford keeper David Button superbly saved Josh Clarke's effort before Cairney slotted in Fulham's second on the break in stoppage time.
A win for Dean Smith's Bees would have taken them into the play-off places before Saturday's Championship fixtures, but they failed to find the net for the fourth time in six league games.
Instead, they were leapfrogged by a Fulham side that is only outside the top six on goal difference.
Fulham, who had scored 11 times in their previous four Championship matches, should have been further ahead by the interval.
Full-backs Scott Malone and Ryan Fredericks were constant attacking threats but some wayward finishing let the visitors down, while Bentley rescued Brentford with saves from Stefan Johansen and Cairney.
Brentford struggled to seriously test Button too often on his return to Griffin Park following his summer move to Craven Cottage.
He made an excellent one-handed stop to deny Clarke an equaliser and Fulham survived a number of scrambles from set-pieces before Cairney's calmly-taken goal sealed victory.
Brentford boss Dean Smith told BBC Radio London:
"We didn't perform well and didn't deserve to win. We knew they would come and press us but our use of the ball was not good enough.
"In the second half our midfielders had to get on the ball higher up the pitch and we were better.
"While not playing at our best, we showed some spirit and stayed in the game until the 93rd minute."
Fulham manager Slavisa Jokanovic told BBC Radio London:
"I am very happy. We showed another positive step and our progress. We tried to show our identity and our style and I am very satisfied for my lads and the Fulham fans.
"We didn't win in the last four games against Brentford and this is a nice present for people around us.
"We are in a learning process and want to be better."
Match ends, Brentford 0, Fulham 2.
Second Half ends, Brentford 0, Fulham 2.
Lasse Vibe (Brentford) is shown the yellow card for a bad foul.
Tom Cairney (Fulham) wins a free kick in the attacking half.
Foul by Lasse Vibe (Brentford).
Goal!  Brentford 0, Fulham 2. Tom Cairney (Fulham) left footed shot from the left side of the box to the centre of the goal. Assisted by Chris Martin.
Substitution, Fulham. Tim Ream replaces Scott Malone.
Andreas Bjelland (Brentford) is shown the yellow card.
Offside, Fulham. Stefan Johansen tries a through ball, but Floyd Ayité is caught offside.
Corner,  Fulham. Conceded by Harlee Dean.
Attempt blocked. John Egan (Brentford) right footed shot from the centre of the box is blocked.
Attempt blocked. John Egan (Brentford) header from the centre of the box is blocked. Assisted by Sullay Kaikai with a cross.
Corner,  Brentford. Conceded by David Button.
Substitution, Brentford. Philipp Hofmann replaces Josh Clarke.
Tom Cairney (Fulham) wins a free kick in the defensive half.
Foul by Nico Yennaris (Brentford).
Foul by Scott Malone (Fulham).
Lasse Vibe (Brentford) wins a free kick on the right wing.
Harlee Dean (Brentford) is shown the yellow card for a bad foul.
Kevin McDonald (Fulham) wins a free kick in the defensive half.
Foul by Harlee Dean (Brentford).
Corner,  Brentford. Conceded by Scott Parker.
Attempt missed. Scott Malone (Fulham) left footed shot from outside the box is close, but misses to the left. Assisted by Tomas Kalas.
Corner,  Fulham. Conceded by John Egan.
Substitution, Fulham. Scott Parker replaces Sone Aluko.
Attempt blocked. John Egan (Brentford) header from the centre of the box is blocked. Assisted by Sullay Kaikai with a cross.
Corner,  Brentford. Conceded by Chris Martin.
Corner,  Brentford. Conceded by Ragnar Sigurdsson.
Attempt missed. Floyd Ayité (Fulham) right footed shot from the centre of the box is close, but misses to the left. Assisted by Stefan Johansen.
Attempt saved. Harlee Dean (Brentford) header from the centre of the box is saved in the centre of the goal.
Attempt blocked. Harlee Dean (Brentford) header from the centre of the box is blocked. Assisted by Sullay Kaikai with a cross.
Corner,  Brentford. Conceded by Kevin McDonald.
Substitution, Brentford. Lasse Vibe replaces Romaine Sawyers.
Substitution, Fulham. Floyd Ayité replaces Lucas Piazon.
Attempt missed. Ryan Woods (Brentford) left footed shot from the centre of the box misses to the left following a set piece situation.
Foul by Kevin McDonald (Fulham).
Josh Clarke (Brentford) wins a free kick on the right wing.
Attempt missed. Sone Aluko (Fulham) left footed shot from the right side of the box is just a bit too high. Assisted by Tom Cairney.
Offside, Brentford. Romaine Sawyers tries a through ball, but Scott Hogan is caught offside.
Attempt saved. Josh Clarke (Brentford) right footed shot from the right side of the box is saved in the bottom right corner. Assisted by Maxime Colin.
Goals from Sone Aluko and Tom Cairney gave Fulham a west London derby win over Brentford at Griffin Park.