By the summer of 1863, Chamberlain had been promoted to colonel and marched the 20th Maine northward in pursuit of Lee. On July 1, the Fifth Corps marched to Hanover, Pennsylvania before turning west toward Gettysburg. An overnight forced march got the troops to a location in rear of Cemetery Ridge the next day and Chamberlain's men took a brief but grateful rest. It was here that Chamberlain faced the distasteful duty of addressing "mutinous" soldiers assigned to the 20th Infantry from the old 2nd Maine, which had been mustered out. A group of men whose enlistments had not expired refused to carry arms and were placed under arrest. Chamberlain's brief speech and his pledge to plead their case caused all but a handful to take arms and join the ranks of the 20th for the coming battle.
The Fifth Corps was called to the front when fighting began at 4 o'clock. With the remainder of Colonel Vincent's brigade, Chamberlain's men rushed to the front to be placed on the southern slope of Little Round Top, the extreme left of the Union line. Within minutes they were trading volleys with Confederate skirmishers tramping down the slope of Big Round Top, soldiers from General Law's Alabama Brigade. The 15th Alabama Infantry, commanded by Colonel William C. Oates, had climbed over the summit of the larger hill, reorganized, and were now sweeping northward toward the Union line. The regiments collided on the hillside and Chamberlain's regiment stood firm. It was a tumultuous scene of savagery as smoke, fire, and the groans of dying men filled the woods. Standing behind his thinning ranks, the colonel could see the effect of the Confederate charges on his position:
"The roar of all this tumult reached us on the left and heightened the intensity of our resolve. Meanwhile the flanking column worked around to our left and joined those before us in a fierce assault, which lasted with increasing fury for an intense hour. The two lines met and broke and intermingled in the shock. The crush of musketry gave way to cuts and thrusts, grapplings and wrestlings. The edge of conflict swayed to and fro, with wild pools and eddies. At times I saw around me more of the enemy than of my own men; gaps opening, swallowing, closing again with sharp, convulsive energy; squads of stalwart men who had cut their way through us, disappearing as if translated all around me, strange, mingled roar- shouts of defiance, rally and desperation; and underneath, murmered (sic) entreaty and stifled moans; gasping prayers, snatches of Sabbath song, whispers of loved names; everywhere men torn and broken, staggering, creeping, quivering on the earth, and dead faces with strangley (sic) fixed eyes staring stark into the sky."In the very deepest of the struggle while our shattered line had pressed the enemy well below their first point of contact... I saw through a sudden rift in the thick smoke our colors standing alone. I first thought some optical illusion imposed upon me. But as forms emerged through the drifting smoke, the truth came to view. The cross fire had cut keenly; the center had almost been shot away; only two of the color guard had been left, and they fighting to fill the whole space; and in the center, wreathed in battle smoke, stood the Color Sergeant Andrew Tozier. His color-staff planted in the ground at his side, the upper part clasped in his elbow, so holding the flag upright, with musket and cartridges seized from the fallen comrade at his side he was defending his sacred trust in the manner of the songs of chivalry. It was a stirring picture..."
The Confederate attacks came in waves, each more intense than the one before. At the height of the fighting, a Confederate bullet struck Chamberlain on his left thigh. Luckily the metal sword scabbard hanging at his side diverted the bullet, leaving him with only with a painful bruise. The colonel leapt to his feet and continued to encourage his men, directing the defense of the rocky hillside. The relentless Confederate assaults shredded Chamberlain's ranks and the situation looked grim as ammunition began to run out. Soldiers ransacked the cartridge boxes of the wounded and dead strewn on the hillside, but there was not enough to continue for much longer and that meager supply soon ran out. Chamberlain had not only been directing his men, but closely observing the southern attacks as well. Sensing exhaustion among the Confederates who were also probably running out of ammunition, he formulated a final plan to defend the 20th Maine's part of the shrinking Union line. There was a brief lull in the fighting when the colonel called all of his officers quickly to a meeting and explained his proposal- the 20th Maine was going to make a charge!
"Not a moment was about to be lost! Five minutes more of such a defensive and the last roll call would sound for us! Desperate as the chances were, there was nothing for it but to take the offensive. I stepped to the colors. The men turned towards me. One word was enough- 'BAYONETS!' It caught like fire and swept along the ranks. The men took it up with a shout, one could not say whether from the pit or the song of the morning sat, it was vain to order 'Forward!'. No mortal could have heard it in the mighty hosanna that was winging the sky. The whole line quivered from the start; the edge of the left-wing rippled, swung, tossed among the rocks, straightened, changed curve from scimitar to sickle-shape; and the bristling archers swooped down upon the serried host- down into the face of half a thousand! Two hundred men!"It was a great right wheel. Our left swung first, the advancing foe stopped, tried to make a stand amidst the trees and boulders, but the frenzied bayonets pressing through every space forced a constant settling to the rear. Morrill with his detached company and the remnants of our valorous sharpshooters... now fell upon the flank of the retiring crowd. At the first dash the commanding officer I happened to confront, coming on fiercely (with) sword in hand and big navy revolver (in) the other, fires one barrel almost in my face. But seeing the quick saber point at his throat, reverses arms, gives sword and pistol into my hands and yields himself prisoner.
"Ranks were broken; some retired before us somewhat hastily; some threw their muskets to the the ground- even loaded; sunk on their knees, threw up their hands calling out, 'We surrender. Don't kill us!' As if we wanted to do that! We kill only to resist killing. And these were manly men, whom we could befriend and by no means kill, if they came our way in peace and good will."
The charge of the 20th Maine Infantry was the climax of the fighting in front of Vincent's brigade and contributed greatly to the Union victory at Little Round Top.
In the spring of 1864, Chamberlain commanded a brigade in the 1st Division, Fifth Corps that he led during the Wilderness Campaign to Petersburg, Virginia. On June 18, 1864, Chamberlain was seriously wounded at the Battle of White Oak Road outside of Petersburg. Taken to a field hospital, the attending surgeon pronounced the wound to be mortal and Chamberlain was thought to be on his death bed. Much to the surprise of all, Chamberlain made a miraculous recovery and by the following spring was strong enough to rejoin the army as a brigadier general, a promotion he had received the day he was wounded. In April 1865, General Chamberlain led his troops at the Battle of Five Forks, which broke the Confederate hold on Petersburg. A sudden change in corps command after that battle placed Chamberlain in command of the 1st Division of the Fifth Corps during the final campaign to Appomattox Court House.
After the surrender terms were signed by General Lee on April 9, General Chamberlain was assigned the task of accepting the formal surrender of arms of the Army of Northern Virginia scheduled for April 12, 1865. It was a cool, wet day. Their lines formed on the road leading to Appomattox Court House, Chamberlain's division watched the tattered gray column trudge toward the village. Without hesitation, Chamberlain called his men to attention and saluted the Confederates as they approached. At the head of the Confederate column a despondent General John Gordon heard the shifting of weapons and recognized the honor. He rose in his saddle, reigned in his horse and boldly returned the salute. Former enemies paid their respects to each other in this last act of the war in Virginia.
Chamberlain returned to peaceful pursuits in Maine after the war and was elected governor of the state. In 1871 he was persuaded to accept the president's position at Bowdoin College where he restructured the college curriculum to include science and engineering. Chamberlain was also active in the Grand Army of the Republic, the national organization of Union veterans. He resigned from Bowdoin College in 1883 due to ill health, but continued to write about his war-time experiences and remained active in veteran circles. He later dabbled in several businesses including real estate, but none satisfied him as much as education. In 1893, Congress honored him with the Congressional Medal of Honor for gallantry at Gettysburg. In 1900, he was appointed Surveyor of the Port of Maine, a position which he held until his death on February 14, 1914. General Chamberlain is buried in Pine Grove Cemetery in Brunswick, Maine.