Harker was born on December 2, 1835, in Swedesboro, New Jersey. As a youth, he worked as a clerk in a retail store owned by U.S. Congressman Nathan T. Stratton. Through the influences of Stratton, Harker received an appointment to the United States Military Academy in West Point, New York. Harker graduated in 1858 with the brevet rank of second lieutenant in the 2nd U.S. Infantry and was assigned to garrison duty at the United States Army post on Governor's Island in New York Harbor. Subsequently, Harker served at outposts in the Oregon and Washington territories.
With the outbreak of the Civil War, Harker was assigned to duty in Ohio to help train newly recruited volunteer soldiers. He was promoted to first lieutenant of the 15th U.S. Infantry on May 14, 1861, and then to captain on October 24, 1861. He was subsequently appointed as the lieutenant colonel of the 65th Ohio Infantry, a regiment in the forces of Brig. Gen. Don Carlos Buell. He became the regiment's colonel on November 11, 1861.
Harker and the 65th OVI participated in the April 1862 Battle of Shiloh, as well as the subsequent Siege of Corinth, Mississippi. In late June, he took over command of the 20th Brigade, 6th Division, Army of the Ohio, replacing James A. Garfield. Later that year, he was involved in the Battle of Perryville in Kentucky. Harker received praise for his significant contributions during the Battle of Stones River at the end of the year while leading the 3rd Brigade, 1st Division, Left Wing of XIV Corps of the Army of the Cumberland.
In 1863, he was in command of the 3rd Brigade, 2nd Division, IV Corps, Army of the Cumberland, Military Division of the Mississippi. He again drew the attention of his senior commanders with a determined stand against Confederate attackers during the Battle of Chickamauga in northern Georgia. In recognition of his performance and service, he was promoted to fill an opening as a brigadier general, dating from September 20, 1863. After participating in the fighting around Chattanooga and the assault on Missionary Ridge, he and his men helped relieve Maj. Gen. Ambrose E. Burnside during the Siege of Knoxville.
In mid-1864, as the Atlanta Campaign began, Harker commanded a brigade under Maj. Gen. Oliver O. Howard. On May 7, he successfully held the peak of Rocky Face Ridge despite determined Confederate efforts to dislodge his men. In June William T. Sherman's Union army attempted to displace Confederate troops from their fortifications on Kennesaw Mountain. Harker was shot from his horse and mortally wounded during a failed attack on June 27, 1864. His body was shipped back to his native Swedesboro, New Jersey, where it was buried in Trinity Episcopal Church Cemetery.