The 29-year-old England left-back was heavily linked with a summer move to Manchester United, who in July appointed former Toffees boss Moyes as Sir Alex Ferguson's successor, but Baines last week signed a new four-year deal to end any speculation over his future.
While he admitted being flattered by Moyes' attempts to persuade him to move to Old Trafford, he revealed that Martinez's charm offensive had ultimately proved more successful.
Baines told the BBC's Football Focus: "I talked about it a lot with the manager (Martinez), we had a lot of conversations because something seemed to be going on and he kept me informed.
"He was adamant that he wanted me to stay here.
"It was flattering really, to have your old manager wanting to take you with him and your new manager really wanting to keep you.
"He said to me that until they decide to accept an offer or not, I could get on with my football and leave it up to them."
Baines, who admitted he got "a bit sick" of the constant newspaper speculation over his future before the summer transfer window closed, insisted he would never have tried to force a move away from Everton by refusing to play.
"I don't think that's a route I would ever take, particularly not with Everton," he added.
"I know a lot of friends and family who've supported the club for a long time so I just don't think it's the right way to go about your business really.
"You can get days when you get a bit sick of (the speculation) and you kind of just want an end to it.
"But that's not the way it works... the transfer window just drags quite a bit.
"I think the manager made a good point at the time, it probably shouldn't be active once the season starts.
"Having been in that position it's something I definitely agree with because it can be a distraction when you just want to play football."
Everton have gone from strength to strength under Spanish manager Martinez and are now locked in a battle for fourth place with Tottenham and Merseyside rivals Liverpool, who plundered a humbling 4-0 derby victory over the Toffees at Anfield on Tuesday.
But, ahead of Saturday afternoon's Premier League visit of Aston Villa, Baines was fully aware that there is plenty of time remaining for Everton to close the four-point gap to the Reds and compete for a Champions League berth.
"It was a real low point, that result," he added. "I think Liverpool were ruthless on the night and finished really well.
"But I said before the game that there was a lot of football still to play after the Merseyside derby and that's still the case.
"The manager's instilled that in us and the fourth spot's as open as it's ever been. We've got from now until the end of the season to be at our best and give it everything we've got.
"That's the only way we'll get there."