Sainz ceded the lead from pole to Max Verstappen but reclaimed his position at the front on lap nine with a DRS pass on the championship leader into Turn 1.
This was a lead that Sainz continued to build, ensuring that he had plenty of margin to absorb any brief moments of pressure from team-mate Charles Leclerc, or Lando Norris' late-race push.
Speaking to Sky Sports, the Spaniard said that he had been incredibly keen to finish his time at Ferrari on a high with at least one more race win before he moves to Williams for 2025.
"It's just a matter of that I think everyone knew I wanted one more race win with Ferrari. I felt like I also deserved it," Sainz said.
"I've been driving well all year and I've been pushing flat out, keeping my motivation high even in a difficult circumstance, and wanting to give everything for this team.
"I felt like I drove some really good races and one more I had to win. Eventually, it happened and it had to be in Mexico, in front of my family, which is great.
"It doesn't mean that I'm not going to try and win more. But it had to be here."
Sainz reckoned that the presence of his family at the race and his confidence with the car led him to feel "something was definitely cooking" in the Mexico weekend.
He admitted that he made his day more difficult by losing position to Verstappen at the start, but crucially had the confidence — and pace — to return the favour on his former team-mate.
"Honestly, it's one of the best feelings in the world for sure. I felt like after Checo probably they were supporting me," he added.
"Since I arrived in Mexico, I had a feeling that the win was possible. I knew my family was coming to see me here this weekend. My mum was going to be present. I knew I hadn't won a race with my mum in front of me.
"My best friends are here, my dad, and I was like 'there might be something cooking this weekend, and I need to make sure I do everything I can to win this race'.
"Even though I made it a bit difficult with the start, then I made it stick with Max and I enjoyed that race from then onwards."