The 47-year-old Leko, who was Brugge coach from 2017-2019, joins from KAA Gent, who said they were unaware of the move.
Hayen, 45, has been Brugge coach since March 2024, when he stepped up from assistant after the dismissal of Ronny Deila.
Brugge won the league title in dramatic fashion at the end of that season and in the last campaign posted a strong Champions League performance while finishing second to Union Saint-Gilloise in the domestic championship.
This season has seen a dip in form, and the weekend defeat against St. Truiden saw Brugge slip from second to third place. League leaders Union have a five-point advantage over them.
"The club would like to sincerely thank Nicky Hayen for his hard work in the past and wishes him all the best in the future," a statement said.
Hayen took charge of morning training at the club on Monday but was told a few hours later that he had been fired.
Gent said they were completely taken aback when Brugge announced that Leko would be Hayen's successor.
"I just learned through the press that Nicky Hayen has been dismissed from Club Brugge and that Ivan Leko is his successor," Gent chairman Sam Baro said in a brief statement.
"I'm as stunned as anyone. I can only say that Club Brugge hasn't contacted us."
Leko had a release clause in his KAA Gent contract, allowing him to leave. The fee was reportedly around one million euros ($1.16 million), Belgian media said.
Brugge have four points from five Champions League games and sit outside the qualifying places in 26th spot, needing to beat Arsenal to have any chance of making February's knockout stages.
