Texas joined six other states on February 1st 1861 and seceded from the Union.
Samuel Houston the Governor of Texas was a faithful Unionist, and his election in 1859 made it seem that Texas would stay in the Union, but the people of Texas felt differently. Following Abraham Lincoln’s election to President there was pressure placed on Houston to call for a convention to consider secession. Houston grudgingly called for a convention in January 1861. He sat silently on February 1st 1861 when the convention voted in favor of seceding. The vote was 166 to 8 in favor, making Texas the seventh state to leave the Union.
In the end 76% of Texans voted in a statewide referendum to secede. Texas became a Confederate States on March 2nd 1861. Houston who refused to take an oath of allegiance to the Confederacy was replaced as Governor by his Lieutenant Governor.
If you like to read the Texas Ordinance of Secession you can find it here.