Aguero went down clutching the top of his chest and received treatment for several minutes before being helped off the pitch just before half-time.
Barcelona later said he was admitted to hospital to have a “cardiac exam”.
Luis Rioja earned Alaves a point after Memphis Depay’s opening curling effort.
Former Manchester City striker Aguero, 33, was taken away in an ambulance and Barca interim boss Sergi Barjuan told La Liga TV: “I can’t tell you much more. I know he has been taken to a hospital and they are having tests done.”
The Argentine was making his first start for the club since his move in the summer.
Aguero joined Barca on a two-year deal after 10 years at City, a spell which saw him become their all-time leading goalscorer with 260 goals in 390 games.
The point against Alaves keeps Barcelona in ninth place – eight points behind La Liga leaders Real Madrid, who beat Elche 2-1 earlier on Saturday.
In front of just over 37,000 supporters at the Nou Camp, interim coach Sergi Barjuan’s side went closest to a first-half opener when Eric Garcia’s downward header was saved by Alaves goalkeeper Antonio Sivera.
Depay was inches away from restoring Barcelona’s lead soon after Alaves’ equaliser, but the Dutchman could only steer his effort from Gavi’s pass against the post.
Philippe Coutinho, who replaced Aguero late in the first half, stung Sivera’s palms with a dipping shot as the visitors held on for their first point at the Nou Camp since 2016.