Longstreet graduated from West Point in 1842, and entered into the United States 4th Infantry. During the Mexican-American War, he fought in the several notable engagements, including the Battle of Monterey. He was promoted to 1st Lieutenant in 1847, shortly before participating in the Siege of Vera Cruz, and then to Captain for "galland and meritorious conduct" in the Battles of Contreras and Churubusco.[2] After the Battle of Molino del Rey, he was promoted to Major. He was severely wounded in the Storming of Chapultepec.

After the war, he continued to serve in the military, until resigning his commission in June of 1861 at the outbreak of the Civil War. He was commissioned as a Brigadier General in the Confederate Army, commanding troops at engagements such as First Manassas. He was promoted to Major General, in 1861, fighting at Yorktown, Williamsburg, Seven Pines, Seven Days, Second Manassas, Antietam, and Fredericksburg.[3] He was promoted to Lieutenant General in 1862, becoming second in command to Robert E. Lee, commanding over half of Lee's army. Longstreet participated in the Battle of Gettysburg, and the Battles of Chickamauga and Chattanooga. He was wounded by friendly fire in the Battle of the Wilderness. After recovering, he participated in the defense of Richmond, Petersburg, and was at Appomattox for Lee's surrender.

After the war, he moved to New Orleans, Louisiana. During Reconstruction, he wrote “let us accept the terms as we are in duty bound to do.” Longstreet became a supporter of the Republican Party in 1868. He was appointed by PresidentRutherford B. Hayes to ambassador to Turkey in 1880. President James A. Garfield appointed him as a U.S. Marshall in Georgia. Many of his fellow Confederates saw Longstreet's support of the Republican Party as treason against the Southern cause, labelling him a "scalawag." Due to this treason, Longstreet became a common scapegoat in the developing Lost Cause tradition, especially for his role at the Battle of Gettysburg, which tradition began to held was lost due to Longstreet and other generals improperly implementing Lee's plan.

Longstreet's cousin, Julia Dent, was the wife of Union General Ulysses S. Grant.