Moustakas smacked a two-run home in the sixth off Alex Cobb (3-2) and notched a sacrifice fly in the three-run Kansas City seventh to help the Royals win for the fourth time in their last six starts.
Lorenzo Cain, Salvador Perez and Jeff Francoeur each had two hits and knocked in a run for the Royals.
James Shields (2-2) held on after a shaky first inning to earn the victory. Shields, who played for the Rays last season, allowed two runs on five hits over seven innings and retired the last 13 batters he faced.
Shields and the Royals were down 2-0 after the first inning but scored four times in the sixth to take the lead for good.
Matt Joyce hit a two-run homer in the first for Tampa Bay, but the Rays did not score after that.