Fort Esperanza, a Civil War earthwork fortification on the eastern shore of Matagorda Island, was constructed to guard Cavallo Pass, the entry to Matagorda Bay. The fort was also known as Fort DeBray, in honor of Col. Xavier Blanchard DeBray, commander of the Sub-Military District of Houston. Building of the fort began in late December 1861, when it was determined that the location of Fort Washington, a small fort put up near the lighthouse in 1842–43 on the extreme southeast corner of Matagorda Island, was too exposed. Confederate colonel R. R. Garland chose a new position farther up the pass, at about the halfway point of the island's frontage on the pass, and ordered Capt. Dan Shea to begin the construction. Additional fortifications were added by Maj. Caleb G. Forshey in February 1862. The fort, itself armed with nine guns including eight twenty-four-pounders and one 128-pounder, was out of range of the guns of large federal vessels in the Gulf but had the same command of the channel as the older Fort Washington. The Confederate assessment was that the shallow water, only ten feet deep, on the bar would prevent vessels larger than gunboats from attempting to enter the bay. This proved correct, but the new fort still did not stop the Union navy from forcing the pass.
On October 25, 1862, less than a month after capturing Galveston, William B. Renshaw, captain of the USS Westfield, sailed past Fort Esperanza. Much impressed by the federals' gunnery, the defenders of the fort retreated to Indianola before they could be cut off. The Union forces seized Indianola after a brief battle. Port Lavaca was extensively bombarded, but a Confederate battery of two guns put up a determined resistance. In early November the Union fleet withdrew from Matagorda Bay, and since they had no ground forces to leave behind to secure their gains, the Confederates reoccupied Indianola and Fort Esperanza.
After the Union debacle in the battle of Sabine Pass in September 1863, the federal invasion plans for Texas shifted south. The Rio Grande valley was invaded in early November. Corpus Christi and Aransas Pass fell in the middle of the month. Union troops advanced up St. Joseph's Island. Their crossing to Matagorda Island was unsuccessfully challenged, and a battle took place on November 23 at Cedar Bayou, which separates the two islands. After Union forces under Gen. T. E. G. Ransom reached Fort Esperanza on November 27 and dug in, a two-day battle followed. On the night of November 29 the Confederates, outnumbered and outflanked, evacuated the fort after spiking the guns, firing their stores, and blowing up their magazines. The fort was occupied and repaired by the Union forces, who used it as their base of operations for further campaigns in the area. In the spring of 1864 the Union troops were withdrawn from Matagorda Bay to participate in the proposed invasion of Texas from northeast Louisiana. After the last of the federals left Matagorda Island on June 15, Fort Esperanza was reoccupied by the Confederates and held until the end of the war.
The eastern walls of the fort were destroyed as the shoreline was eroded by a storm in 1868. By 1878 the rest of the nine-foot-high, twenty-foot-thick, turf-covered walls had eroded away, but the shore was accreting again. The outlying emplacements and rifle pits can still be traced in some areas.