The England Under-21 international was given permission to talk to Everton boss David Moyes over the weekend and a deal has now been agreed.
Baines, who turned down a switch to Sunderland two weeks ago, admits it was a tough decision to leave Latics.
"I've had six fantastic years here and it was a really tough decision to leave that behind because this is the club who have given me the opportunity to make it in the game," he told the club's official website.
"It's been a real adventure here and it's one I'll never forget, but I need a fresh challenge."
Coincidentally, Wigan's opening game is against Everton on Saturday but Baines could struggle to make the match as he has a hamstring injury.
Meanwhile, Latics boss Chris Hutchings is banking on starting the season without Baines and has already begun searching for a left-back.
Hutchings explained: "The timing does not help us to be honest but we have been looking at left-backs and that will continue.
"The situation with Leighton has rumbled on and we would have liked it sorted out earlier.
"But we have to move on. We would like to bring someone else in but I do not know if that will happen."
Hutchings continued: "He has done a fantastic job for this club after coming through the system.
"He was brought up here and knows a lot of people but sometimes you need to make a change in your life."
If Hutchings fails in his bid to bring in a replacement, then Kevin Kilbane will almost certainly fill in as an emergency left back.
Hutchings added: "He has played there a number of times in pre-season and have every confidence in him."
Vi bruger cookies for at kunne give dig den bedste oplevelse. Ved at bruge vores side accepterer du brugen af cookies. Du kan læse mere i vores persondatapolitik.