The 23-year-old signed for West Ham from Basel in 2019 but managed just nine Premier League appearances last term – none of which were starts.
Ajeti has now left London Stadium without a goal to his name in any competition, with the Switzerland international joining Scottish champion Celtic.
Although the fee is undisclosed, media reports suggest it is £4.5million, almost half what West Ham paid for him a year ago.
He links up with his former Basel team-mate Mohamed Elyounoussi, who is spending a second season loan at Celtic from Southampton.
"We are delighted to bring Albian to Celtic. He is a tremendous player, an international with real quality and I know he is really determined to do all he can to bring more success to our supporters," Neil Lennon said.
"I have admired him for long time as he is a really intelligent footballer, well balanced and a really good finisher. We are so pleased to make him a Celtic player and we hope he has a long and prosperous career with us."