If you follow the utk.edu link below, you can read the "Declaration of the Causes which Impel the State of Texas to Secede from the Federal Union." This will tell you, in the words of the Texan secessionists themselves, why Texas chose to secede from the Union. From the words of the declaration, it is quite clear that slavery and the desire to maintain the slave system was the major cause of Texas's secession from the Union.
As you read the declaration, you should be struck by how many times the text refers to slavery. Slavery is the first thing mentioned in the substance of the declaration and it is the last. The text mentions at the start that Texas came into the Union as a slave state and it says that the federal government has been unfair to the slave states. At the end of the declaration, they state that they hold as an "undeniable truth" that
...the servitude of the African race, as existing in these States, is mutually beneficial to both bond and free, and is abundantly authorized and justified by the experience of mankind, and the revealed will of the Almighty Creator, as recognized by all Christian nations; while the destruction of the existing relations between the two races, as advocated by our sectional enemies, would bring inevitable calamities upon both and desolation upon the fifteen slave-holding states.
From this, it is quite clear that the desire to maintain the slave system was Texas's main reason for seceding.