Here, the PA news agency looks back at the news which rocked cricket.
The shock announcement was made after scans revealed Taylor had the condition arrhythmogenic right ventricular cardiomyopathy (ARVC).
His diagnosis was similar to that of former Bolton footballer Fabrice Muamba – who collapsed on the field after suffering cardiac arrest in an FA Cup tie against Tottenham in 2012.
The dynamic middle-order batsman, who had won his seventh cap in England's most recent Test against South Africa at Centurion, went on to have an operation to fit a defibrillator.
Taylor, who began his professional career with Leicestershire before moving to Nottinghamshire in 2012, retired with impressive statistics.
The diminutive batsman made more than 9,000 first-class runs, at an average above 46, and hit 20 centuries.
His List A record is even better, with more than 5,000 runs at 53.11, and in 27 one-day international appearances for England he averaged 42.23.
Taylor made his Test debut against South Africa at Headingley in 2012, but after his first two caps that summer he had to wait more than three years to begin to re-establish himself in the team.
He said on Twitter: "Safe to say this has been the toughest week of my life! My world is upside down. But I'm here to stay and I'm battling on! #lifestooshort.
"Absolutely overwhelmed with all the support I've received. You don't understand how much it means to me and how much it helps! Thank you!"
How the sporting world responded
Nottinghamshire director of cricket Mick Newell told the players of the news before the third day of their Specsavers County Championship opener against Surrey, a match Taylor initially pulled out of due to illness.
Newell spoke of the shock of everyone at Trent Bridge, saying: "Myself and all of James' team-mates and colleagues are terribly sad to hear this news, which comes as a big shock to us all.
"He is a model professional, the most hard-working I've ever known in cricket, making it all the more difficult to accept that his career has been cut short in this way.
"I think the initial devastation (of being told) you aren't going to play cricket was then tempered by how grateful he is to be alive so that's probably why he perked up a little bit.
"They (the doctors) have been telling him that quite a lot of the time they don't find out about this illness until it is too late."
Muamba is one of small number of professional sportsmen who have had to retire in similar circumstances – including Wales rugby union front-rower Rhys Thomas, also in 2012, and Ireland prop Simon Best.
The former footballer sent his own to Taylor message, via Twitter: "@jamestaylor having life is a great option. Retirement is inevitable, but for some of us it's just earlier than expected. Enjoy life."
Taylor replied: "Look forward to hopefully meeting you one day mate! #inspiration"
His England team-mate Chris Jordan made clear how badly Taylor's presence as a colleague will be missed.
"When I woke up to that news this morning, I was a little bit lost for words," the Sussex seamer told Sky Sports News.
"But I think that, in times like these, it's more important to think about him as a person ... around the dressing-room, he was a real livewire and a real good guy to have around.
"I really do wish him all the best."
Life after retirement
Taylor made an initial move into broadcasting, joining the BBC's Test Match Special team.
But in 2018 he was named a a full-time selector for the England team, by the recently-appointed national selector Ed Smith.