The Dane's teammates worked all day for their sprinter, pacing the final climb of Surrel before Mathias Vacek dropped him off with 300 metres to go, and Pedersen made no mistake to beat Belgium's Van Aert by half a wheel.
Having won all stages in all three grand tours, Pedersen pulls on the pink leader's jersey - the Maglia Rosa - for the first time, the first from Denmark, too.
Vacek told Eurosport on the line: "We were already trying to do a hard pace to get rid of the sprinters. In the end, I had really good legs, and I could do a really good leadout for Mads, and it was crazy.
"It's a big achievement, and I am so proud that he could take the pink jersey today."
Third on the stage was Movistar's Orluis Aularm, fourth was Francesco Busatto from Intermarche Wanty, whilst Tom Pidcock of Q36.5.
The 2025 Giro started in Albania with a hilly run from Durres to the capital of Tirana, and it only took a few kilometres for a group of five to get up the road.
They were only given a maximum lead of around two minutes as Lidl Trek, Visma Lease-a-bike, and Alpecin Deceunick did the bulk of the work to contain the gap in the early going.
A 13-kilometre category two climb greeted the riders midway through the stage, with Sylvain Moniquet cresting the summit first, meaning he took the first King of the Mountains jersey in this year's race.
But the action really began once the peloton got into Tirana as Lidl Trek set a ferocious pace on both ascents of Surrel. Pedersen was never out of the front five places on the climb, dictating to his teammates to set the pace, and it was the turn from climber Giulio Ciccone that proved decisive.
His two-kilometre pull towards the top of the climb saw some general classification riders drop, including Derek Gee, thinning the leading group down to around 30 riders. All of the sprinters, including Kaden Groves and Olav Kooij, were sent out the back door, leaving just Pedersen and a tiring Van Aert to battle it out for the win.
On the sketchy descent to the line, disaster struck for veteran Mikel Landa, who seemed to crash at speed into an unguarded pole. The Spaniard was stretchered off the course into an ambulance, seeing his Giro ended on the first day.
But no one could stop the Dane from grabbing his first pink jersey, and he saluted his team for their efforts after the stage.
Pedersen paid tribute to his team after the stage, speaking to Eurosport, he said: "The team was absolutely amazing, it's pure class from my teammates and it's great to pay them back and win the pink jersey."
Stage two sees the riders tackle a 13.7km individual time trial around the streets of Tirana, where Van Aert has a great chance of taking the overall lead of the race from Pedersen.