Cort won out of a big 29 rider break established after 40 kilometres to finish ahead of Ion Izagirre (Bahrain Merida) and Bauke Mollema (Trek-Segafredo) to secure back-to-back victories for Astana.
"It’s amazing," said Valgren. "It was one of my biggest dreams when I’ve started riding a bike. This is my first Tour de France and I'm so happy to win a stage here. I want to thank my team for giving me a chance to ride this Tour.
"A special thank to Michael Valgren as well, who did an absolutely incredible job today, providing me with a huge support! Everything was just perfect today and our sports director Lars Michaelsen had great confidence in me for winning this stage."
Cort, 25, added to his already impressive tally of Grand Tour stage wins, which had previously included two wins at the Vuelta a Espana.
"Many days ago we already discussed this stage and he (Michaelsen) told me it could suit me really well," said Cort. "So, today I went in a breakaway together with Michael Valgren and, finally, everything worked out perfectly. So, I'm very happy!"
The general classification was unchanged after the Geraint Thomas (Sky) led peloton switched off for the day and rolled in some 13 minutes after the stage winner.
Attacks, attacks and more attacks marked the beginning of the stage with no breakaway able to manifest itself until over 40 kilometres had passed, but when it did the group was a big one containing 29 riders.
Polka Dot Jersey wearer Julian Alaphilippe (Quick-Step Floors) struck early to win the KOM at the Côte de Luzençon, further extending his lead in the KOM classification.
Lilian Calmejane (Direct Energie) broke away to crest the Col de Sié alone in the lead but eventually fell back into the relative comfort of the big break. Next, it was the turn of Fabien Grellier (Direct Energie) and Julien Bernard (Trek-Segafredo) with the latter taking the points at the intermediate sprint in Mazamet.
Rafal Majka (BORA-hansgrohe) made his move out of the break and bridged across to the leading pair, before hitting out solo himself.
In chase were Cort, Ion Izagirre and Domenico Pozzovivo for Bahrain-Merida, Marc Soler (Movistar), Michael Valgren (Astana), Lilian Calmejane (Direct Energie) and the Trek-Segafredo pair of Bauke Mollema and Toms Skujins.
Majka - later awarded the combativity prize - crossed the top of the Pic de Nore and was later caught by the chasing group on the flat run into Carcassonne.
There was plenty of attacking on the flat run into the finish with attacks and counterattacks flowing from the group as they battled out stage honours.
In the end it was an impressive attack by Mollema that formed a gap, with Cort and Izagirre scrambling to get over to the Dutchman. They made good on their escape and the trio chopped and changed on their way to the finish before a winner was decided.
Cort put his sprinting prowess to good use, keeping an eye on his breakaway companions before launching his sprint with 250 metres to go to take a convincing victory.
Back in the peloton, there was some brief excitement when Dan Martin (UAE Team Emirates) attacked from the peloton at the beginning of the ascent to Pic de Nore. Martin saw his efforts nullified by the Team Sky led peloton soon after and that was the end for the GC action on the day.