We tend to think of Leonardo da Vinci as a painter, even though he probably produced no more than 20 pictures before his death in 1519. Yet for long periods of his career, which lasted for nearly half a century, he was engrossed in all sorts of surprising pursuits, from stargazing and designing ingenious weaponry to overseeing a complex system of canals for Ludovico Maria Sforza, the ruling duke of Milan. During the course of his life, Leonardo filled thousands of pages of manuscript with dense doodles, diagrams, and swirling text, probing almost every conceivable topic. Not for nothing, then, is he often considered the archetypal Renaissance man: as the great British art historian Kenneth Clark put it, Leonardo was the most relentlessly curious person in history.

Yet according to Leonardo da Vinci: The Mechanics of Man, a new exhibition at the Edinburgh International Festival, one area of scientific endeavour piqued Leonardo’s curiosity arguably more than any other: human anatomy.

Leonardo’s interest in anatomy began when he was working for Ludovico in Milan. “On the 2nd day of April 1489”, as he wrote at the head of a page in a new notebook, he sat down to begin his “Book entitled On the Human Figure”. After executing a sequence of stunning drawings of a skull, though, his studies went into abeyance, probably because he lacked access to corpses that he could dissect.

Bodies of evidence

But his ambitions to publish a comprehensive treatise on human anatomy persisted – and around two decades later, he returned to his otherwise unused notebook, which is now known as the Anatomical Manuscript B and is kept at the Royal Library at Windsor Castle. In it he made a number of pen-and-ink drawings recording his observations while dissecting an old man who had died in a hospital in Florence in the winter of 1507-08.

In the years that followed, Leonardo concentrated on human anatomy more systematically than ever before – and by the end of his life he claimed that he had cut up more than 30 corpses. In the winter of 1510-11, while probably collaborating with a young professor of anatomy called Marcantonio della Torre at the University of Pavia, Leonardo compiled a series of 18 mostly double-sided sheets exploding with more than 240 individual drawings and over 13,000 words of notes. Now known as the Anatomical Manuscript A, and also in the Royal Collection, these sheets are full of lucid insights into the functioning anatomy of the human body.

Leonardo made many important discoveries. For instance, he produced the first accurate depiction of the human spine, while his notes documenting his dissection of the Florentine centenarian contain the earliest known description of cirrhosis of the liver. Had he published his treatise, he would be considered more important than the Belgian anatomist Andreas Vesalius, whose influential textbook On the Fabric of the Human Body appeared in 1543. But he never did.

Heart of the matter

Yet arguably Leonardo’s most brilliant scientific insights occurred after Marcantonio’s death from the plague in 1511, when the great polymath fled political turmoil in Milan and took shelter in the family villa of his assistant Francesco Melzi, 15 miles (24km) east of the city. It was here that he became obsessed with understanding the structure of the heart.

The heart surgeon Francis Wells, who works at Papworth Hospital in Cambridge and recently published The Heart of Leonardo, recalls coming across Leonardo’s studies for the first time as a medical student. “I remember thinking that they were far better than anything we had in modern textbooks of anatomy,” he says. “They were beautiful, accurate, absorbing – and there was a liveliness to them that you just don’t find in modern anatomical drawings.”

During his investigations, Leonardo discovered several extraordinary things about the heart. “Up until and after his time, because of course he never published, the heart was believed to be a two-chambered structure,” Wells explains. “But Leonardo firmly stated that the heart has four chambers. Moreover, he discovered that the atria or filling chambers contract together while the pumping chambers or ventricles are relaxing, and vice versa.”

In addition, Leonardo observed the heart’s rotational movement. “If you look at a heart, it is cone-shaped,” says Wells. “But it’s a complex cone in a geometric sense, because it’s a cone with a twist. This is because the heart empties itself with a twisting motion – it wrings itself out, a bit like the wringing out of a towel. In heart failure it loses this twist.”

According to Wells, Leonardo didn’t fully understand the function of cardiac twist. “But everything starts somewhere,” he says. “There’s a passage in which Leonardo describes the slaughter of some pigs on a Tuscan hillside. You or I would probably enjoy a nice glass of red wine while the pork was cooking, but Leonardo was thinking about this at the time. They killed the pigs by pushing little spears through the chest into the heart, and Leonardo noticed the rotational movement of these little spears in the heart. It was totally blue-sky research, of no use to anybody of his time, but it was a correct start along the road to understanding cardiac twist, which is now one of the hottest topics in understanding heart failure.”

Perhaps most impressive of all, though, were Leonardo’s observations about the aortic valve, which he made while experimenting with an ox’s heart. Intrigued by the way that the aortic valve opens and closes to ensure blood flows in one direction, Leonardo set about constructing a model by filling a bovine heart with wax. Once the wax had hardened, he recreated the structure in glass, and then pumped a mixture of grass seeds suspended in water through it. This allowed him to observe little vortices as the seeds swirled around in the widening at the root of the aorta. As a result, Leonardo correctly posited that these vortices helped to close the aortic valve. Yet because he never published his far-sighted research, this remained unknown for centuries.

“This wasn’t understood until the 20th Century,” says Wells, “when it was shown most beautifully in [science journal] Nature in 1968 by two engineers in Oxford. There was only reference to Leonardo da Vinci. There are two extraordinary things about that: first, there was only one reference, and second, the reference was 500 years old.”

So what made Leonardo such a brilliant anatomist? “One mustn’t get carried away claiming that Leonardo was a completely unique figure,” says Martin Clayton, head of prints and drawings in the Royal Collection, and the curator of the Edinburgh exhibition. “There were lots of investigative anatomists around at the time, and there were lots of artists who were interested in anatomy. But Leonardo pushed these two things further than anybody else. He was the supreme example of an anatomist who could also draw, or of an artist who was also a very skilled dissector. It was the union of these two skills in a single figure that made Leonardo unique.”

Alastair Sooke is art critic of The Daily Telegraph.

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.