James Hamilton's father was a minister. He was apprenticed in 1683 and married the daughter of a deceased goldsmith in 1694.
He was the first Librarian of the Incorporation from 1700 to 1702. Several books had been presented to the Incorporation in 1696 and over the following years more books and a variety of curiosities were donated.
In 1697, Walter Porterfield lent 2000 merks and James Hamilton 3000 merks towards the cost of building the new Hall.
From 1702 until 1704, James Hamilton was Deacon and it was while he was in office that the first two public anatomical demonstrations were held. He and Archibald Pitcairne, who concluded both sets of lectures, were the only surgeons to officiate at both dissections. Hamilton's subject was ‘anatomie in generall with a dissection and demonstration of the common teguments and muscles of the abdomen’.
A man ‘much emploied in midwifery’, he was in attendance at the fatal confinement of Lady Clerk of Pennycuick, described under Robert Clerk. This is one of the earliest references to obstetrics in Scottish medicine.
Edinburgh was first in the field in formal teaching of obstetrics, the surgeon Joseph Gibson being appointed Professor of Midwifery by the Town Council in 1726. At the same time the Council enacted that no person should presume to practise midwifery in the city (‘except such persons who have actually been bred to chirurgery’) until they had presented a certificate to the magistrates. The practice of obstetrics at this time, apart from rare exceptions such as that recorded above, was entirely in the hands of midwives who had no formal training. Gibson became a member of the Incorporation in 1722 and practised in Leith for some years before his appointment.
His son (also James) became a Fellow of The Royal College of Surgeons of Edinburgh on 18th March 1747.