Lucas Paqueta made the breakthrough in the eighth minute of the contest, before Roland Sallai levelled the scores early in the second period, but Aguerd decided the match in the 66th minute.
The result has left the Hammers top of Group A on six points, while Freiburg remain second on three points despite losing at home.
West Ham made the breakthrough in the eighth minute of the match when Jarrod Bowen's brilliant cross from the right was headed into the back of the net by Paqueta.
The Hammers almost doubled their lead in the 12th minute when Mohammed Kudus struck towards goal, the Freiburg goalkeeper made a mess of it, but the ball bounced onto the post before being gathered by Noah Atubolu.
Paqueta again had the ball in the back of the net in the 14th minute at the end of a slick move, but the offside flag was raised, much to the relief of the home side's supporters.
Freiburg had more of the ball as the first period progressed, but the German side were finding it difficult to carve out opportunities, with West Ham goalkeeper Lukasz Fabianski unmoved.
The first period ended with West Ham on the attack, with the final opportunity coming to James Ward-Prowse, but the midfielder's effort was comfortably saved by Atubolu.
Freiburg managed to level the scores in the 49th minute, though, with Sallai thumping the ball into the back of the net from close range after West Ham had survived twice in quick succession, with Fabianski making a smart save before Aguerd produced a block.
Sallai then brought an excellent save from Fabianski in the 51st minute, with the Bundesliga side much improved in the early stages of the second period.
Freiburg should have taken the lead in the 55th minute, but Kiliann Sildillia's header hit the inside of the post before Nicolas Hofler smashed the rebound over the crossbar.
West Ham managed to regain the lead in the 66th minute after a spell of pressure, with Aguerd heading a corner from Ward-Prowse into the back of the net after rising unmarked inside the penalty area.
Kudus rolled one wide of the far post in the 79th minute, with the Hammers looking for a third, but two proved to be enough, as David Moyes's side picked up an impressive European win.
West Ham will now switch their attention back to the Premier League, preparing to host Newcastle United on Sunday, while Freiburg will travel to Bayern Munich in the Bundesliga on the same afternoon.