It looked like being a frustrating evening for Ronny Deila’s men until Boyata headed in from Kris Commons’ corner in the 82nd minute.
The goal gives the Scottish champions a narrow advantage ahead of the return leg in Baku next Wednesday, although the tie appears far from over on the evidence of the first leg.
Celtic had beaten Icelandic part-timers Stjarnan 6-1 on aggregate in their previous qualifier, but Qarabag delivered on their promise to be a much tougher obstacle.
It was not one of the big European nights at Celtic Park in terms of atmosphere but the home supporters tried their best to increase the tempo amid a flat start to the match.
Qarabag, neat and tidy at times in possession, were far from under siege and they threatened on the break.
Celtic’s first real attempt on goal came in the 24th minute when midfielder Gary Mackay-Steven’s drive from the edge of the box was grabbed by Ibrahim Sehic at the second attempt.
Five minutes later, in another Qarabag break, wide-man Javid Taghiyev’s pass to Richard Almeida at the edge of the penalty area was swept just past Craig Gordon’s right-hand post by the Brazilian midfielder.
Gordon, who extended his contract earlier in the day, then made an unorthodox save from Almeida’s whipped-in free-kick, after Virgil van Dijk had been booked for a foul on Taghiyev.
Celtic’s start to the second half revealed more zest if not more potency.
Nadir Ciftci headed an Emilio Izaguirre cross wide of the target before smashing the ball straight at Sehic from 12 yards after getting a break on the ball.
Sehic also made a fantastic save from a powerful Van Dijk header before the Dutchman fired a long-range drive just over the bar.
Commons came on for Ciftci with 10 minutes remaining and, when he whipped in a corner from the right, Boyata, who scored in the previous round at home to Stjarnan, rose high to bullet his header past Sehic, with the Qarabag keeper claiming he had been fouled to no avail.
Celtic will unfurl the Scottish Premiership flag against Ross County on Saturday as the league season begins but they still have a bit of work to do next week to remain in the Champions League.