His father Alexander Nasmyth was a landscape painter of Edinburgh, where James was born. One of Alexander's hobbies was mechanics and he employed nearly all his spare time in his workshop where he encouraged his youngest son to work with him in all sorts of materials.
James was sent to the High School where he had as a friend Jemmy Patterson, the son of a local iron founder.
Being already interested in mechanics he spent much of his time at the foundry and there he gradually learned to work and turn in wood, brass, iron, and steel. In 1820 he left the High School and again made great use of his father's workshop where at the age of 17, he made his first steam engine.
Some years later the subject of steam carriages for use on the roads was arousing a lot of interest and in 1828 James made a complete steam carriage that was capable of running a mile carrying 8 passengers.
This accomplishment increased his desire to become a mechanical engineer. He had heard of the fame of Henry Maudslay's workshop and resolved, to get employment there. With this object in view he drew out and carefully constructed a small steam engine, every bit of which was hand made.
In 1829 he went to London and called on Maudslay, taking his drawings and steam engine with him, and as a result Maudslay appointed him his own private workman at 10 shillings a week. Unfortunately, Maudslay died two years later, whereupon Nasmyth was taken on by Maudslay's partner as a draughtsman.
When Nasmyth was 23 years old he decided to set up in business on his own and returned to Edinburgh. He eventually decided to move to and eventually settled in Patricroft, Manchester. In August 1836, the Bridgewater Foundry was opened.
Nasmyth invented the screw ladle for moving molten metal which could safely and efficiently be handled by one man.
In the summer of 1840 Nasmyth married Anne Hartop, the daughter of an ironworks manager in Barnsley, and at about the same time he began to receive orders from the newly-opened railways which were beginning to cover the country, for locomotives. His connection with the Great West Railway whose famous steamship SS Great Western had been so successful in voyaging between Bristol and New York, led to him being asked to make some machine tools of unusual size and power which were required for the construction of the engines of their next and bigger ship SS Great Britain.
When even the largest hammer was tilted to its full height its range was so small that if a really large piece of work were placed on the anvil, the hammer had no room to fall. Faced with this dilemma the constructional engineer wrote to Nasmyth. Nasmyth thought the matter over and seeing the obvious defects of the tilt-hammer, that a small object was struck a heavy blow while a large object, which required a much heavier blow, received only a light one, sketched out his idea for the first steam hammer.
At the last minute the ship constructors decided to abandon the paddles in favour of the new screw-propulsion and so, for a time, there was no need for the new steam-hammer.
In April 1840, Nasmyth visited France with a view to supplying the French arsenals and dockyards with tools and while he was there took the opportunity to visit the Creuzot Works. On going round the works, he found his own steam-hammer at work.
A short explanation soon cleared up the mystery and upon his return to England, Nasmyth immediately patented the hammer and began to manufacture them. The first hammers were of the free-fall type but they were later modified, given power-assisted fall.
Up until the invention of Nasmyth's steam-hammer, large forging, such as ships' anchors, had to be made by the "bit-by-bit" process, that is, small pieces were forged separately and finally welded together.
Its advantages soon became so obvious that before long Nasmyth hammers were to be found in all the large workshops all over the country. Nasmyth subsequently applied the principle of his steam hammer to a pile-driving machine which he invented in 1843.
Among his many other inventions was a means of transmitting rotary motion by means of a flexible shaft made of coiled wire, and a machine for cutting keys grooves, also self-adjusting bearings, a steam ram and a hydraulic press.
He retired from business in 1856 when he was 48 years old, for as he said "I have now enough of this world's goods: let younger men have their chance".
He settled down in Kent where he happily pursued his various hobbies including astronomy until his death in 1890.
He was the last of what might be called the pioneers of the machine tool industry.