The positional move for the Bayern Munich captain was one of the first things implemented by Guardiola following his arrival last summer, and the switch helped Bayern win the league and cup double last term.
"It was good because it was different," Lahm told the Daily Mail. "I played at full-back for 10 years and then there was the chance to do something new.
"In pre-season he played me in midfield. I had a lot of discussions about it with the coach."
Lahm is currently 13th in Bayern's list of record appearances holders, having turned out 401 times for them so far in his 12-year career.