It was a Klingon propaganda device.
The Klingons apparently appreciated the works of Shakespeare so much that they 'retconned' him to be one of their own poets rather than a human from Earth.
From Wikipedia's article on The Klingon Hamlet, sourced to the DVD commentary on the film Star Trek VI: the Undiscovered Country:
The film's director Nicholas ...
According to the Development section of the Wikipedia article for The Undiscovered Country:
With the looming 25th anniversary of the original series in 1991, producer Harve Bennett revisited an idea Ralph Winter had for the fourth film: a prequel featuring young versions of Kirk and Spock at Starfleet Academy. The prequel was designed to be a way of ...
The President of the Federation according to the Memory Alpha website, is actually an Efrosian, and not a Klingon. Granted there are distinct similarities...
Efrosians were invented by Kirk Thatcher, an associate producer on Star Trek IV, in honor of unit production manager Mel Efros.
I don't think the whole problem was ever explained and I guess in the end it's really just a plot device, especially considering how often McCoy scanned and treated alien lifeforms without any problems.
While I can't name any "precedent", the movie's story is essentially a trope: two parties want to make piece, hardliners sabotage it, inconvenient ...
But I am constant as the northern star,
Julius Caesar Act 3 Scene 1 Page 4
To be or not to be?
Hamlet Act 3 Scene 1
The undiscovered country
The Tragedy of Hamlet Prince of Denmark Act 3 Scene 1
Once more unto the breach, dear friends
Henry 5 Act 3 Scene 1
Cry havoc, ...