The 29-year-old, who played all four games in Spain’s Euro 2016 campaign, scored 39 goals in 103 appearances for Celta in 2013 after spells at Granada, Benfica and Barcelona.
Guardiola has already signed Australia midfielder Aaron Mooy from sister club Melbourne City and Ilkay Gundogan from Borussia Dortmund.
“I’ll do everything the manager asks of me, try my absolute best and do everything I can to try to repeat the form I’ve shown throughout my career,” said Nolito.
“It’s just about trying to play my normal game and let’s hope that I can help Manchester City to win games. Pep Guardiola is one of the best managers in the world. He knows a lot about the game and he’s going to help me progress as a player and I’m sure he’ll get the best out of me.”
Defender Martin Demichelis has left City after his contract expired.