Even before Heth's four brigades were properly gathered together the army marched north on its ill-fated invasion of Pennsylvania. On June 30th 1863, while at Cashtown, General Pettigrew read in a newspaper that there was a shoe factory at Gettysburg and marched over to requisition its contents. To his surprise, he found the town occupied by enemy cavalry, and, mindful of his instructions not to bring on a general engagement, he returned to Cashtown to report. Heth was furious that Pettigrew had allowed the Army of Northern Virginia's vaunted infantry to be intimidated by a handful of horsemen. He ordered a staff officer to: “Tell General Pettigrew not to butt too hard, or he’ll butt his brains out,” and promised A. P. Hill he would take his division down to Gettysburg the next day and “get those shoes”. Hill and Heth were simply spoiling for a fight - though the one they got can hardly have been to their liking. Unbeknown to them, the army's cavalry screen had got lost and had failed to report that the enemy's infantry was approaching Gettysburg from the opposite direction by forced marches.

Heth's own approach to Gettysburg brushed aside small groups of enemy videttes until his advance guard neared the McPherson's Ridge on the outskirts of town. There his skirmishers, under Archer, discovered an enemy cavalry brigade blocking the road. Without horsemen of his own to act as scouts, Heth was in a difficult situation. He decided to shell the woods on the ridge to see if any enemy infantry was present. Getting no response, he deployed Archer and Davis and sent them in to get the shoes. The two brigades advanced without maintaining contact with each other and beyond supporting distance of the rest of the division. As they reached the ridge they were ambushed by units of the Federal 1st Corps, which had just arrived on the field. Archer was captured, and the Confederates fell back in confusion. Brockenbrough, who had, by now, also deployed, was sent to Archer's aid, but it was too late.

This setback was embarrassing, but not quite as serious as some historians have implied. Heth's total losses amounted to some 700 men, or about 10% of his effective strength. He remained calm, pulled his men back to Herr Ridge, and deployed all four brigades in line to await developments.

Early in the afternoon fierce fighting began to his left and at 2 P.M. he went in to relieve pressure on Rodes' Division, which was heavily engaged. Heth's attack was devoid of subtlety. He simply launched a straight frontal assault. Given the urgency of the situation, the inexperience of his brigade commanders and the fact that the enemy's flank was protected by cavalry, he had no choice, but it placed a terrible burden on the men in the ranks. The assault was well coordinated and went in without flinching. A surgeon of Pender's Division described it thus:

“… we could… see the infantry of Heth's division advancing in line of battle. It was really a magnificent sight.”

Storming across open fields and into the Herbst Woods, Heth's men drove the legendary Iron Brigade from three consecutive positions and, in a little over half an hour, secured the McPherson's Ridge. Casualties were horrific. Over 2,000 of the 6,000 men who went into action were killed or wounded. Counting the casualties of the morning, the division had lost over 40% of its strength in a single day's fighting. Heth himself was amongst the wounded. He was hit in the head by a spent bullet, and concussed. The bullet would have killed him but for its having glanced off a wad of paper stuck inside the band of a new hat.

Two days later, with Heth still on the sick list, the survivors of his division were designated to take part in “Pickett's Charge”. The already battered division was virtually massacred in another, this time suicidal, frontal assault. Unsupported and with its flank in the air, Brockenbrough's Brigade failed to press the attack, but the other three continued bravely on until repulsed with dreadful casualties. There were whispers that the new division had failed to properly support Pickett's men. These ill-informed slurs deeply hurt Heth and affected him for the rest of his life.

By the end of the battle of Gettysburg 5,000 of Heth's 7,000 men had been killed, wounded or captured. The retreat from that place was a nightmare. Torrential rain turned the roads into a quagmire. Heth later reported that, on the night of July 13th, while heading for the Potomac River and safety, it took his men twelve hours to cover seven miles. His division, temporarily consolidated with the remnants of Pender's, formed the army's rearguard and it was hoped to have it across the river by dawn on the 14th, but things did not go according to plan. Faulty staff work at Army or 2nd Corps H.Q. caused the designated pontoon bridge to become clogged with 2nd Corps artillery. The morning of the 14th found Heth and his exhausted men still on the north bank. He deployed Brockenbrough's Brigade along a ridge to cover his column and nervously awaited events. About midday, he spotted horsemen in front of his position but concluded they were part of the Confederate cavalry screen. Unfortunately, this was not the case. Heth had again been let down by Stuart's troopers. The local cavalry commander had withdrawn the screen without notifying him. The 50 or so horsemen were Federals. They charged right into Brockenbrough's Brigade, mortally wounding Johnston Pettigrew, and causing a stampede, as half-asleep men rushed to grab their unloaded rifles. Heth rode down the line shouting “Keep cool, men, keep cool!” Captain Dunaway, of Brockenbrough's staff, noted with amusement that Heth looked in need of his own advice. The men who surprised Brockenbrough were soon all killed or captured, but large numbers of other Federal horsemen were spotted preparing for action. Heth began deploying his brigades to make a fight of it, but Hill ordered him to escape with as many men as possible. The entire force began a disorganised scramble for the pontoon bridge at Falling Waters. All except for Brockenbrough's Brigade that is. For some reason, the colonel took it into his head to launch a counter-attack. About half his men, and a large proportion of his field and staff officers, were surrounded and forced to surrender. Brockenbrough himself got away, but his career was finished. For an army used only to victory, it was all too much. The papers were full of stories of negligence. Surgeon Welch, of Perrin's Brigade, noted:

“The [enemy's] attack was a complete surprise and is disgraceful either to General Heth or General Hill.”

Heth apparently simply did not dare tell Lee what had happened. In his report he claimed Federal accounts of the capture of Brockenbrough's Brigade were a “deliberate falsehood” and that “not one organised command, not even a company” had fallen into enemy hands. In fact, total Federal captures amounted to 750 men. Colonel Mayo's report of the operations of Brockenbrough's Brigade, which admitted the rearguard was asleep and that 230 of its 450 or so men fell into enemy hands, simply disappeared into Heth's papers, and was only discovered quite recently. Lee, accepting Heth's version of events, wrote to the Confederate Adjutant and Inspector General, stating “No arms, cannon, or prisoners were taken by the enemy in battle.“ From his P.O.W. cell in the Old Capitol Prison, Captain Dunaway read this with “surprise and grief“ and concluded that General Lee had been “misinformed by some¬body.“ The Federal army commander thought the same and said “General Lee has been deceived by his subordinates.”

Following the Gettysburg campaign, the high command made determined efforts to restore the combat effectiveness of Heth's Division. They consolidated the remnants of Brockenbrough's and Archer’' commands and placed them under newly appointed Brigadier General H. H. Walker. Walker proved to be an efficient officer. They also assigned J. R. Cooke's Brigade to the division. This was more than just a numerical accession. Cooke was an officer of outstanding ability, and the army inspector regarded his brigade as the best he had ever seen. Heth was therefore to be given another chance to show what he could do.

This chance came in October 1863, when the army once again tried its favourite manoeuvre of striking into the enemy's rear. Heth led the advance, and hopes were high. These days, however, the enemy was less easy to fool than in the past. As Heth and Hill rushed forward to “surprise“ one U.S. corps, they were ambushed by a second, near Bristoe Station. Cooke and Heth twice notified Hill that they were walking into a trap, but Hill recklessly persisted in ordering the division forward. So impatient was the corps commander, that he would not even allow Heth time to deploy Walker's Brigade. Instead, Cooke and Kirkland's (formerly Pettigrew's) Brigades went forward alone, to their doom. “Well,“ said Cooke, as he was ordered in, “I will advance, and if they flank me, I will face my men about and cut my way out.“ In a little over half an hour the two brigades were wrecked, losing 1,350 men killed, wounded and captured out of a total of less than 3,000. Both Cooke and Kirkland were seriously wounded. Heth had his horse shot from under him.

For a third time Heth's fine division had been disgracefully beaten. Walter Taylor, Lee's adjutant-general, expressed the views of the entire army when he wrote: “There was no earthly excuse for it.“ Although the defeat was not Heth's fault, there must have been mutterings that he was incompetent. In desperation, he appears to have asked A. P. Hill for a written statement to the effect that he [Heth] was not to blame for the debacles at Gettysburg, Falling Waters and Bristoe Station. Hill graciously obliged, taking personal responsibility for the latter defeat.

The temporary loss of the services of Cooke and Kirkland embarrassed Heth in his next battle, at Mine Run. He was about to launch a frontal attack when he noticed the senior colonel in charge of one of his brigades had left a large gap between his own unit and the neighbouring one. Heth reluctantly, but sensibly, called off the assault.

In the aftermath of Mine Run, Heth was able to repay his corps commander's previous kindness. H. H. Walker submitted a report criticising Hill for pushing his brigade too far forward without proper support. Walker's report, like Mayo's, simply disappeared into Heth's personal papers.

During the winter of 1863/64, Heth's Division once again revived its fighting capacity. The ranks filled up and Cooke and Kirkland returned to duty. Brigadier General Davis went on sick furlough, leaving his brigade in the hands of its admirable senior colonel, John M. Stone (later governor of Mississippi). At the brigade level, the division's leadership was now well above average. Morale improved, and at the battle of The Wilderness, on May 5th 1864, Heth's troops had the pleasure of repaying the Federals for many of their previous reverses. That night, however, Heth was refused permission to pull back and regroup. Hill gave him specific instructions that the men were not to be disturbed. Heth interpreted these instructions literally and did not even dig in where he was. One of his brigade commanders, J.R.Cooke, regarded this as pure folly and dug in anyway, against orders. The next morning the Federals attacked in overwhelming strength. With the exception of Cooke's troops, the division fled. Cooke held out until the Federals had passed so far beyond his flanks that he was forced to fall back. The situation was finally saved by the arrival of the 1st Corps.

Heth later tried to make his excuses to Lee, but Lee simply replied; “A division commander should always have his division prepared to receive an attack.“ Heth felt, “… General Lee never forgave… me for this awful blunder.”

By the summer of 1864, Heth's performance as a divisional commander must have been giving cause for concern. Whether he was unsuccessful due to incompetence or bad luck could be argued, but the lack of success was there for all to see. The great historian of the Army of Northern Virginia, D. S. Freeman, while accepting Heth's account of Falling Waters, and taking a sympathetic view of the general's part in the failure to dig in at the Wilderness, more or less ignores him in his account of the rest of the war. Heth is simply labelled as a bad luck loser, and his influence over future events discounted.

Freeman's attitude, however, has less to do with Heth's actual contribution to the army's operations in the fall of 1864 than with his disproportionate interest in the 2nd Corps' campaign in the Shenandoah Valley, and his fixed view that the army's command and performance steadily declined during the siege of Petersburg. Freeman was so cast down by his idea that A. P. Hill was failing to live up to expectations that he barely bothers to analyse the 3rd Corps' fight to hold the Petersburg line. Recent studies of the 1864 defense of that city have led to a more sympathetic view of Hill and his men. As R. J. Sommers has shown, even while their cause was demonstrably failing on other fronts, the Confederate army at Petersburg fought on with determination and success, inflicting serious tactical reverses on an enemy that possessed both numerical superiority and the strategic initiative. During this period, Henry Heth was A. P. Hill's senior lieutenant and, on occasions, was directly in command of the 3rd Corps. The central part that he played in many of these late war successes encourages a reappraisal of his capacity as a divisional commander.