The now Barcelona striker felt a pain in his chest during the first half of his side's 1-1 draw with Alaves.
The 33-year-old was replaced by Philippe Coutinho on the pitch while he was taken straight to hospital.
The Catalan club wrote on Twitter: "@aguerosergiokun reported chest discomfort and has been admitted to the hospital for a cardiac exam."
Barcelona's caretaker coach Sergi Barjuan said after the game: "I was told he was feeling a bit dizzy.
"I have just learned that he was taken to hospital and I can't say much more until I know."
There was also a message of support from his former club Man City as they wished him well.
The club wrote: "Everyone at Manchester City wishes you a speedy recovery, @aguerosergiokun. We're with you."
Former teammate Sterling sent a message to Aguero on social media.
He said: "Stay strong my brother @aguerosergiokun, we're all with you. Get well soon."
Aguero joined Barcelona in the summer on a free transfer from City with the club currently in disarray following the departure of Lionel Messi and sacking of manager Ronald Koeman.
The striker has managed just five appearances, scoring just one goal that came in the El Clasico defeat to Real Madrid.