According to Wikipedia:
On September 5, 1861, in Chicago, Horatio Spafford married Anna Larsen of Stavanger, Norway. The Spaffords were well-known in 1860s Chicago. Horatio was a prominent lawyer. He and his wife were also prominent supporters and close friends of evangelist Dwight L. Moody.By the way, Philip Bliss, who wrote the melody for Horatio Spafford's "It is well with my soul," perished only a couple of years later:
Spafford had invested heavily in the city's real estate. The Great Chicago Fire which swept through the city in 1871 destroyed almost everything Spafford owned.
The Spaffords' only son was killed by scarlet fever at the age of four.
Two years later, in 1873, Spafford decided his family should take a holiday somewhere in Europe. He chose England knowing that his friend D. L. Moody would be preaching there in the fall. He was delayed because of business, so he sent his family ahead, his wife and their four daughters: eleven year old Anna "Annie"; nine year old Margaret Lee; five year old Elizabeth "Bessie"; and two year old Tanetta.
On November 22, 1873, while crossing the Atlantic on the steamship Ville du Havre, their ship was struck by an iron sailing vessel and 226 people lost their lives including all four of Spafford's daughters. Anna Spafford survived the tragedy. Upon arriving in England, she sent a telegram to Spafford beginning "Saved alone."
Spafford then sailed to England, going over the location of his daughters' deaths. According to Bertha Spafford Vester, a daughter born after the tragedy, Spafford wrote "It Is Well With My Soul" on this journey.
On 29 December 1876 the Pacific Express train which Bliss and his wife were traveling in approached Ashtabula, Ohio. While the train was in the process of crossing a trestle bridge, which collapsed, all carriages fell into the ravine below. Bliss escaped the carriage but the carriages caught fire and Bliss returned to try and extricate his wife. No trace of either body was discovered. Ninety-two of the 160 passengers are believed to have died in what became known as the Ashtabula River Railroad Disaster. The Blisses were survived by their two sons, George and Philip Paul, then aged 4 and 1 respectively."Naked I came from my mother’s womb, and naked shall I return. The LORD gave, and the LORD has taken away; blessed be the name of the LORD" (Job 1:21).