Ba blow for Stoke
It is understood an initial £7.1 million fee had been agreed - as well as personal terms - for the 25-year-old Senegal international.
Ba visited the club's Clayton Wood training ground for a medical, only to be given the bad news.
Stoke City chief executive Tony Scholes said: "Having agreed all the financial terms of the deal with Hoffenheim and the player, he failed his medical. We will therefore not be signing him on a permanent basis."