General Lee thus describes Porter's position, at which the battle of Gaines' Mill, or Cold Harbor, was fought on the afternoon and evening of the 27th of June:

He occupied a range of hills resting in the vicinity of the McGehee house and his left near that of Dr. Gaines, on a wooded bluff, which rose abruptly from a deep ravine. The ravine was filled with sharpshooters, to whom its banks gave great protection. A second line of infantry was stationed on the side of the hill behind a breastwork of trees above the first; a third occupied the crest, strengthened with rifle trenches and crowned with artillery. The approach to this position was over an open plain, about a quarter of a mile wide, commanded by this triple line of fire and swept by the heavy batteries south of the Chickahominy. In front of his center and right the ground was generally open, bounded on the side of our approach by a wood, with dense and tangled undergrowth and traversed by a sluggish stream which converted the soil into a deep morass.

Old Cold Harbor was in front of the Federal right, and Gaines' mill in front of his right center, the length of his line being about 2 miles and running in a curve from the "wooded bluff" on his left to a swamp on his right. The attack on this position was made by two roads running parallel with the Chickahominy, one going to the Federal left, and the other by Gaines' mill, opposite his right center. Longstreet attacked on the former, and A. P. Hill on the latter, D. H. Hill and Jackson attacking from the direction of the Federal front and right. At 4 p. m. A. P. Hill ordered his whole division forward, and the desperate struggle began, in which every inch of ground was to be won by a great sacrifice of life, and to be disputed with heroic firmness. Gregg, who was first engaged, fought his way through the tangled wood and the boggy morass to the foot of the main position, when, confronted by a determined and unfaltering resistance, and his lines torn by artillery from the crest in front and by a battery on his right flank, he could make no further progress. Marshall was ordered to take the battery on the right, and advanced gallantly, Perrin's, Joseph Norton's, Miller's and Miles Norton's companies in front, under Lieutenant-Colonel Ledbetter. The battery was withdrawn, but its support in the woods, composed of a strong body of troops, among them the New York Zouaves, held the ground in a fierce combat. The Zouaves attacking on the left flank, Lieutenant Higgins promptly assembled 30 riflemen, and held them in check. The attack being pressed anew, the regiment, having lost 81 killed and 234 wounded out of 537, and being unsupported, was forced to retire to its former position. But Marshall's gallant charge and contest had driven off the battery, and Gregg ordered the First, Twelfth and Thirteenth forward again. The struggle for the crest was renewed with heroic zeal and courage, and met with splendid firmness, driving Gregg back a second time. A third advance was ordered, and now the Fourteenth, Col. Samuel McGowan, being by Gregg's request relieved from outpost duty, was conducted by his aide, Capt. Harry Hammond, to his right flank. Passing through Crenshaw's guns, McGowan's men moved right forward, supported by the other shattered regiments of Gregg's brigade. "Tired as they were," says Gregg, "by two days and nights of outpost duty, and by a rapid march under a burning sun, they advanced with a cheer and at a double-quick. Leading his regiment to the right of the Thirteenth and across the hollow, Colonel McGowan arrived just in time to repulse the advance of the enemy and prevent them from establishing a battery on the brow of the hill." With varying success, backward and forward, Gregg struggled to gain and pierce the Federal line, but not until the final and united charge of Lee's whole line was made at 7 o'clock, and when Hood had gained the "wooded bluff" and turned the Federal left, did the Confederate commands mount the whole line of defense and drive its heroic defenders from the field.

Gregg lost 829 (estimated) killed and wounded. The severest losses in the brigade fell on the Rifles, the Fourteenth and the Twelfth. The Rifles lost 319, the Fourteenth, 291, and the Twelfth, 155. At one time every one of the color-guards of the First volunteers was shot down around Colonel Hamilton, who took the colors. The color-bearer, Sergeant Taylor, fell with the colors in his grasp, as he was planting them forward of the line, and Corporal Hayne, seeing Colonel Hamilton take the flag, seized it, and gallantly going forward, fell mortally wounded. Private Spillman, of Company K, then took the flag and carried it to the final charge in triumph to victory. He was promoted color-bearer on the field for gallant conduct. Among the lamented dead of the First was the gallant and accomplished Lieut.-Col. A. M. Smith, who left a sick bed to take his place in his country's service. In the Twelfth, Colonel Barnes was wounded, but did not leave the field. Lieut. J. W. Delaney, commanding Company B, was killed in the first assault; Captain Vallandingham lost a leg, and Captains Miller, McMeekin and Bookter were wounded. In the Thirteenth, which was mainly in support, the loss was not so heavy, 8 killed and 40 wounded. In the Fourteenth, Colonel McGowan and Maj. W. J. Carter were wounded, as were also Captains Brown, Taggart and Edward Croft, and Lieutenants Brunson, O. W. Allen, Stevens, McCarley, Dorrah and Carter; and the gallant Lieut. O. C. Plunkett, Company H, was killed on the field. The First Rifles (known as Orr's Rifles) suffered terribly. Its gallant adjutant, J. B. Sloan, Captains Hawthorne and Hennegan, Lieutenants Brown and McFall, and Sergeant-Major McGee died heroically leading in Marshall's charge. In Gregg's battle, a section of Capt. D. G. Mcintosh's battery was called into action late in the afternoon, too late to take an active part in the battle, as the enemy's artillery in front had been silenced, or had retired. He lost 1 man killed and 2 wounded, and 5 horses killed.

The other South Carolina troops at the battle of Gaines' Mill were with Hood and Longstreet. The brigades of Hood and Law composed Whiting's gallant division, which had marched from Ashland as the advance of Jackson's corps. They went into battle in the late afternoon, after A. P. Hill had been fighting for two hours.[B] With Hood was the Hampton legion infantry, under Lieut.-Col. M. W. Gary, and with Longstreet was R. H. Anderson's South Carolina brigade. These troops had the honor of taking part in Longstreet's and Whiting's final charge along the front and flank of the Federal left, and were among the first to gain the coveted crest and pierce and turn his flank, capture his artillery and decide the day.

Hood moved to the final assault with Hampton's legion on his left. On the left of the legion was Law's splendid brigade. Immediately on Hood's right was Pickett's brigade, and in support of Pickett the brigades of Wilcox, Pryor and Featherston. Thus, in the decisive charge, ordered by General Lee all along the battle line, they were hurled against and around the "wooded bluff" on the Federal left. In this grand assault, R. H. Anderson's brigade was divided, part of it supporting Pickett and part Wilcox. The writer regrets that neither General Anderson nor any one of his regimental commanders has a report of the battle on file. The same is true of the Hampton legion, Colonel Gary.

General Hood reports that he ordered the legion "to gain the crest of the hill in the woods and hold it, which they did." General Longstreet, reporting the action of his brigade, refers specially to the gallantry of General Anderson and Colonel Jenkins, these officers commanding the separated parts of the brigade of Anderson. In the official returns, the loss of Anderson at Gaines' Mill and Glendale (Frayser's Farm) is given in total at 787. The losses of the Fourth, Fifth and Palmetto sharpshooters at Gaines' Mill are reported as 173. The losses of the Second Rifles and Sixth South Carolina at this battle are not given separately from Glendale. Hood reports the legion's loss at only 20. Anderson's and Gary's losses at Gaines' Mill could not have been more than 350, which was less than a half of Gregg's loss. Anderson and Gary were only engaged in the last attack, and Gregg was fighting from the opening of the battle to its close, with a short rest in the afternoon.

Referring to the gallant conduct of officers as well as soldiers, General Longstreet remarks in his report upon the battle of Gaines' Mill, that "there was more individual gallantry displayed on this field than any I have seen." General Whiting, in closing his report, pays the same tribute to a number of soldiers, and especially remarks upon the conduct of Maj. John Haskell, of D. R. Jones' staff, who had volunteered to carry information of the Federal movements to General Lee, as they were observed from the south side of the Chickahominy, and acted on General Longstreet's staff, as a volunteer aide. General Whiting says:

Though not on my staff, I should not do right were I not to mention here the chivalrous daring of young Major Haskell, of South Carolina. His personal bearing in a most deadly fire, his example and directions contributed not a little to the enthusiasm of the charge of the Third brigade. I regret to say that the brave young officer received a terrible wound from a shell (losing his right arm), but walked from the field as heroically as he had gone into the fire.

The South Carolina batteries were more fortunate in their losses than the infantry commands. Rhett, whose horse was shot under him, lost 2 wounded at Gaines' Mill; Bachman's battery (German Artillery) and McIntosh's, only a few men each. The nature upon the ground was not favorable to the Confederate artillery, and the batteries engaged under great disadvantage.