He spent most of the remainder of the war as a prisoner, and was finally paroled on April 16, 1865, one week after Robert E. Lee surrendered the Army of Northern Virginia following the Battle of Appomattox Court House.
As a young boy, Trimble's mother and father both died of fever within a short period of time, and he was sent to live with his half-brother in Kentucky.
He was nominated by U.S. Representative Henry Clay to attend the United States Military Academy at West Point, New York, from which he graduated in 1822, 17th in a class of 42.
Artillery regiments, and left the U.S. Army in May 1832, along with five of his West Point classmates, to pursue the emerging business of railroad construction.
Following the firing on the Federal installation of Fort Sumter in Charleston harbor in South Carolina in early April 1861, he led a contingent of Maryland state militia to burn the railroad bridges around Baltimore to prevent the entry of any more Federal regular army or Northern state militia from passing through the divided riotous city following the bloodshed conflict of the Pratt Street Riots on April 19, 1861, on the orders of the Mayor of Baltimore George William Brown and Governor of Maryland Hicks.
[2] At the start of the Civil War, Trimble participated in efforts to restrict the movement of Union troops to Washington, D.C., by burning bridges north of Baltimore.
He was appointed a brigadier general in the Confederate States Army on August 9, 1861, and was assigned to construct artillery batteries along the Potomac River and later the defenses of Norfolk, Virginia.
He distinguished himself in the Battle of Cross Keys by fighting off an attack from Union troops under Maj. Gen. John C. Frémont, and then seizing the initiative to counterattack and rout them.
During the Seven Days Battles under Jackson outside of Richmond, Virginia, his brigade had few engagements, but they fought hard at Gaines' Mill and he sought to follow up the unsuccessful Confederate assault on Malvern Hill by making a night attack, but his request was refused.
Trimble's forced march and action at Manassas Station received praise from Jackson, who said it was "the most brilliant that has come under my observation during the present war."
Pope was forced by this maneuver into attacking Jackson's strong defensive positions and suffered a severe defeat in the Second Battle of Bull Run.
By November, he developed camp erysipelas and a probable case of osteomyelitis, and his ambitions for elevation to division command were on hold until he was well enough to return to active duty.
(During this period Trimble also feuded with Maj. Gen. J. E. B. Stuart about their conflicting reports of the battle and who bore primary responsibility for the seizure of the Union supply depot.
Riding north, he caught up with Lt. Gen. Richard S. Ewell on the way to Harrisburg, Pennsylvania, and joined his staff as a supernumerary, or senior officer without a command.
A more colorful version of this account has been immortalized in Michael Shaara's novel, The Killer Angels and in the film Gettysburg, where Trimble directly tells Robert E. Lee his feelings about Ewell not taking the hill.
His leg was amputated by Dr. Hunter McGuire, and Trimble could not be taken along with the retreating Confederates, because of fear of infection that would result from a long ambulance ride back to Virginia, so he was left under the care of a family in Gettysburg on July 6 as the army withdrew.
In March 1865, Lt. Gen. Ulysses S. Grant ordered Trimble to be sent to City Point, Virginia, for exchange, but by the time he reached there, Robert E. Lee's army was already retreating in the Appomattox Campaign.