Wigan have agreed a compensation fee with Brentford and Rosler will be officially unveiled on Monday.
Wigan chairman Dave Whelan said: “Uwe is one of the brightest young managers in the Football League and his ambition is to manage in the Premier League.
“He impressed me enormously when I spoke to him, he has a strong philosophy about how to play the game and has a desire to shape all aspects of the long term future of the club.
“I think he can and will achieve great things here at Wigan Athletic.”
Rosler has steered Brentford into fourth place in League ONe this season.
Brentford sporting director Mark Warburton said: “Uwe’s departure is of course a loss to the club but any such departure is testament and recognition of the hard work and dedication he, his staff and of course the players have displayed over the course of the last two and a half years.
“Uwe leaves the club in an excellent condition and I know that he and I both share the absolute belief that this squad of players can move the club forward to achieve its aims and ambitions.
“I personally want to wish Uwe all the very best in his new role, thank him for his outstanding work and also for his support to me.
“He is a good friend and will always be welcome to visit us at GP at any time.”