Having already qualified for the last 16, Massimiliano Allegri's side went into Wednesday's encounter needing a victory to guarantee first place in the group, but they were dealt a blow when Hoarau opened the scoring from the penalty spot with his 100th Young Boys goal.
Hoarau proved a thorn in Juve's side again in the 68th minute, with his sublime goal ensuring that Paulo Dybala's exceptional effort was a mere consolation, although Cristiano Ronaldo hit the post before the visitors' scorer had another brilliant strike disallowed.
4 - Guillaume Hoarau has scored four goals in Champions League this season, no French player has scored more. Update. pic.twitter.com/2B6veIe6iY— OptaJean (@OptaJean) December 12, 2018
After seeing an early effort blocked on the line, Ronaldo should have done better in the 15th minute, but lashed a low effort wide with just Marco Wolfli to beat, before Douglas Costa failed to turn Mario Mandzukic's cross on target.
It was a risky play from Costa that led to Juve paying for their profligacy. Alex Sandro was unable to control his compatriot's pass across the area before subsequently bringing down Nicolas Moumi Ngamaleu, with Hoarau's subsequent spot-kick going in off the upright despite Wojciech Szczesny's best efforts.
Hoarau nearly restored parity with a sliced clearance against his own crossbar two minutes after the restart, but the striker had his second goal at the right end when he curled in from 20 yards out.
Dybala's wicked strike gave Juve hope with 10 minutes remaining, and – after Ronaldo had headed against the upright – the Argentine thought he had rescued a point in stoppage time.
But, although Dybala's long-range effort had found the top corner, the goal was disallowed, with Ronaldo, who was evidently frustrated at full-time, having moved towards the ball from an offside position.
What does it mean? Lacklustre Juve have work to do
Allegri's side will still go through in pole position, but on the basis of Wednesday's display, the Serie A champions have much to improve on at both ends of the pitch if they are to go deep in this season's competition.
Young Boys, at least, have a famous first Champions League victory to take from their maiden campaign in the competition.
Hoarau hits a century in style
Szczesny will likely be frustrated that he failed to parry Hoarau's penalty wide after getting a good hand to it, but the shot just had enough power to evade Juve's goalkeeper and go in off the upright, bringing up the striker's 100th goal for Young Boys.
Even though he got lucky when his attempted clearance hit the bar, Hoarau showed his quality with a sublime second to cap off a fine individual performance.
Nightmare introduction for substitute Alex Sandro
Having replaced the injured Juan Cuadrado, Alex Sandro had been on the pitch for just five minutes when he clumsily locked legs with Ngamaleu, having been put in trouble by Costa's pass.
Key Opta Facts
Despite losing this contest, Juventus have topped their Champions League group for the second time in the last three seasons. When they achieved the feat in 2016-17, they went on to reach the final.
Paulo Dybala has scored four goals in his two fixtures against Young Boys this season – the first Juventus player to net at least four times against a single opponent in the same Champions League campaign since David Trezeguet v Celtic in 2001-02.
Juventus have won two and conceded two penalties in the Champions League this season; only FC Porto (8) have seen more penalties in their matches.
Juve's focus will now switch to the Turin derby on Saturday, while Swiss Super League runaway leaders Young Boys face Neuchatel Xamax before their winter break.