Speaking to Sky Sports, the England international reflected on his final months as a City player and the loan spell that preceded his eventual departure.
Walker, who left Manchester City in the off-season to join Burnley, spent the second half of the 2024/25 campaign on loan at AC Milan.
He joined the Serie A giants during the January transfer window at a time when City were struggling to find form in the Premier League - something the veteran right-back now regrets.
Despite helping Milan strengthen defensively during his brief spell in Italy, Walker's absence was felt at City, where his leadership and experience had long been valued.
"Should I have left and gone on loan to AC Milan? I was the club captain, and you're the first one in line when things are not going really well," Walker told Sky Sports.
"At that time in the season, should I have left? Looking back at it now, probably no.
"I should have stood by or next to my team-mates, next to my friends, and people who I class as my family. But for the first time, probably in my career, I was selfish and I thought about myself and I wanted to play football."
Now at Burnley, the former City captain is focused on a new chapter in his career.