The rep made the confirmation to People magazine after Alley's family didn't specify what type of cancer she had. Family members said in a death announcement Monday night that the illness was "only recently discovered".
"She was surrounded by her closest family and fought with great strength, leaving us with a certainty of her never-ending joy of living and whatever adventures lie ahead," Alley's family said in a statement on Tuesday.
Alley, who was 71, won an Emmy and a Golden Globe for her portrayal of bar manager Rebecca Howe on Cheers, and received an Emmy for the TV drama movie David's Mother.
Meanwhile, former US president Donald Trump joined the list of public figures paying tribute to Alley amid the shocking announcement of her death.
"Kirstie was a great person who truly loved the USA. She will be missed!!!" he wrote on Monday on his Truth Social website.
Alley faced backlash on social media because of her backing of Trump and claimed she was blackballed for her political leanings.
During a May 2021 interview with Fox Nation's Tucker Carlson, she said she was previously advised to keep quiet about which side of the aisle she was on during the 2016 election.
But for Trump's re-election campaign she openly stood with him, announcing on Twitter her plans to vote for him in 2020 because he was "not a politician" and "gets things done quickly and he will turn the economy around quickly".
"People go, 'You're so brave.' I go, 'No, I think I'm stupid,'" she confided to Carlson.
"Because, honestly, it is a real situation. And it is a real blackballing situation. And it's so strange to me because artists are free-thinkers for the most part."
"You can be cooking meth and sleeping with hookers, as long as apparently you didn't vote for Trump," she added, referencing the hypocrisy in Hollywood.
"I feel like I'm in The Twilight Zone a bit, with the whole concept of it."