Born in Pittsburgh, Pennsylvania, Pearson studied law at Meadville College and Jefferson College. He was admitted to the Allegheny County bar on January 14, 1862, but worked in the profession for only a few months before leaving to join the army.
He enlisted in the 155th Pennsylvania Infantry on April 2, 1862, and was commissioned a captain in Company A later that year, on August 23. Over the next few years he took part in all of his regiment's operations and received a series of promotions: to major on December 31, 1862, to lieutenant colonel on July 22, 1863, and to colonel on August 31, 1863. On December 14, 1864, President Abraham Lincoln nominated Pearson for appointment to the brevet grade of brigadier general of volunteers, to rank from September 30, 1864, and the U.S. Senate confirmed the appointment on February 14, 1865.
On March 29, 1865, in the last weeks of the war, Pearson participated in the Battle of Lewis's Farm in Virginia. When a Union brigade was pushed back by intense Confederate fire, Pearson rallied his regiment and led an attack which successfully regained the lost ground. For these actions, he was awarded the Medal of Honor several decades later, on September 17, 1897. In the last months of his military service he commanded the 3rd Brigade and later the 1st Brigade of 1st Division, V Corps. He was mustered out of the Army on June 2, 1865. On January 13, 1866, President Andrew Johnson nominated Pearson for appointment to the brevet grade of major general of volunteers to rank from May 1, 1865, and the U.S. Senate confirmed the appointment on March 12, 1866.
After the war Pearson returned to Pittsburgh and resumed the practice of law. He was elected Allegheny County's district attorney in October 1868 and served in that post until health problems forced him to retire from the legal profession. He later worked as a county gas inspector. Pearson was appointed a major general in the Pennsylvania National Guard in 1870 and placed in command of the 6th Division. He served in that capacity during the Great Railroad Strike of 1877, in which dozens of rioters were killed when his troops opened fire.
Pearson was active in veterans' affairs and was for many years a manager of the National Soldiers' Home. He was one of the organizers of the Grand Army of the Republic and was commander of the group's Department of Pennsylvania. He helped organize another veterans' group, the Union Veteran Legion, and was its first national commander. He was also a member of the Military Order of the Loyal Legion and the Medal of Honor Legion.
Pearson married Elizabeth Harwood Stewart and had a son, Alfred Laurence Pearson, who went on to become a successful businessman. He died on January 6, 1903, at age 64 and was buried at Allegheny Cemetery in Pittsburgh.
Pearson's official Medal of Honor citation reads:
Seeing a brigade forced back by the enemy, he seized his regimental color, called on his men to follow him, and advanced upon the enemy under a severe fire. The whole brigade took up the advance, the lost ground was regained, and the enemy was repulsed.