James Hamilton was born in Entrien, near Belfast, Ireland in 1819, and immigrated with his family to Philadelphia in 1834. An English patron named William Erwin financed his education at Mr. Luddington's Drawing School. He later enrolled at the Pennsylvania Academy of the Fine Arts and in addition to painting, gained skill in engraving and etching. Hamilton was encouraged to pursue a career as an artist by engraver John Sartain (1808–1897). Hamilton obtained a position as a drawing instructor, and the brothers Edward (1829–1901) and Thomas (1837–1926) Moran were among his students.
Hamilton’s work was exhibited at the Artists’ Fund Society in Philadelphia, 1840-45; Pennsylvania Academy of the Fine Arts, 1847-1869, 1876-1878, 1880; National Academy of Design, 1846-1847; the Mechanics' Institute, San Francisco, 1876-80; at the California State Fair, 1881; Oakland Museum; Brooklyn Museum; Boston Museum; Metropolitan Museum; Philadelphia Maritime Museum; Pennsylvania Historical Society; and other galleries in the United States and in London. Hamilton’s early works were mostly topographical landscapes and seascapes of various sites along the Atlantic coast that reflected the influence of Thomas Birch (1779–1851). His painting of John Paul Jones' sea victory, Capture of the Serapie, made him famous at an early age.
Hamilton worked as an illustrator for John Frost’s Pictorial History of the American Navy (circa 1845) and later collaborated with Arctic explorer Elisha Kent Kane by providing illustrations for The U.S. Grinnell Expedition in Search of Sir John Franklin (1853) and Arctic Explorations (1856).
In 1854 Hamilton traveled to London and remained there for two years. During this time he was deeply influenced by Joseph Mallord William Turner (1775–1851), whose work he had already studied through engravings, to the extent that he became known as "The American Turner." After returning to the United States, Hamilton rapidly rose to being one of the country’s foremost marine painters. His mature work was characterized by its loose, painterly technique, along with the use of rich color and dramatic lighting effects. His romantic compositions often include ship wrecks, naval battles, fires and storms at sea. One of Hamilton's paintings, What Are the Wild Waves Saying, was inspired by a scene from Charles Dicken's novel Dombey and Son. Hamilton gave the painting to Dickens, and the author, expressing much appreciation, later said it was the only gift he accepted during his American tour.
In 1875 Hamilton sold off the contents of his studio to finance an intended trip around the world. He moved to San Francisco in 1876, joining the San Francisco Art Association and establishing a studio at 309 California Street where he began painting the maritime activities of San Francisco Bay. Hamilton died in San Francisco on March 10, 1878.