He noted that the modern medical "oath" was based on the Hippocratic Oath, which had said, in its original form: "I will give no deadly medicine to anyone if asked, nor suggest any such counsel."
Addressing about 260 graduates, mainly with qualifications in medicine and medical laboratory science, at the Regent Theatre, Dunedin, at a ceremony on Saturday Prof Taylor said he had spent the past three years involving himself in end-of-life care and the need to do it better.
Public discussions about advanced care planning was bound to increase and that was good.
"However, let us be clear: arguments in favour of ending the life of a sufferer as a means of eliminating suffering are fundamentally flawed, even though they may be subtly tempting.
"They are just as flawed as the argument that Hiroshima and Nagasaki were justified in order to shorten the Second World War.
"The landscape of geopolitical relationships changed irrevocably with the advent of nuclear weapons.
"So, too the relationship between doctors and their patients would be irrevocably changed, especially for the elderly, if legislation to facilitate assisted suicide were to be enacted.
"This view is not just my own, but is the position held by the New Zealand Medical Association."
He urged graduates to take a generous approach to public service, including in developing nations abroad.
But he warned his "young colleagues" they were about to enter a professional world that was often "shaped by self-preservation" - also called "covering your butt".
As well as in individuals, this phenomenon was also found in institutions, and he referred to "those forces" that operated in hospitals and universities, and in every other large human organisation, to "make us behave differently when we are part of a bigger machine, to suppress our consciences and to blunt our willingness to be compassionate".
"It is a tragic mystery that when human beings get together as an organisation, we become collectively conditioned to be much less humane."
He reminded graduates of the biblical Parable of the Good Samaritan.
The Good Samaritan had not only showed compassion in stopping to help the stricken traveller, but "more than that, he had guts".
He urged graduates to "have the moral courage to take risks for the sake of others".