Malan, 33, helped Middlesex secure promotion from Division Two of the County Championship last summer, as well as featuring in the Royal London Cup. He scored 200 runs in six red-ball innings after joining as a replacement for Peter Handscomb, including 93 away to Worcestershire to confirm Middlesex's second-place finish, and 394 at 65.66 in the 50-over competition.
"We are thrilled that Pieter will be returning to Middlesex for the 2023 season," Middlesex head of men's performance cricket, Alan Coleman, said. "He made a huge impact in his time with the club this summer and we can't wait to have him back in the home dressing room next year.
"He brings not only a huge amount of quality and experience to the side, but also a real drive, passion, and commitment to succeed. He works extremely hard at his game and is the ideal role model for our younger players to play alongside and learn from.
"Right from the outset this summer he hit the ground running, finding good form early, and consistently making an impact at the crease. The innings of 93 he hit against Worcestershire in our final game was the standout innings of the season for me, given the really tough conditions, the challenging surface, and the importance of the match situation - it was absolute world-class.
"We can't wait to welcome Pieter back next year and look forward to him joining up with the side again."
Malan, who played three Tests against England on their 2019-20 tour of South Africa, has previous experience of Division One with Warwickshire, for whom he played six matches and averaged 37.66 in 2021.
Malan said: "I'm delighted to be returning to Middlesex and Lord's next season. I was made to feel so welcome from day one, which made the decision to return very easy. Being part of the Championship promotion push at the end of the season was fantastic and I'm really excited to see the team continue their journey in Division One next year."