In Texas, we don't use the phrase "legal custody." To the extent that the term has any meaning, you probably already have legal custody, meaning that you are lawfully in possession of your nephew.
What you are looking for is the power to take action on behalf of the child or make decisions for him. You have three ways you can do it.
1. NON PARENT RELATIVE AGREEMENT. You can enter into a Texas Family Code Chapter 34 agreement that gives a non-parent relative (that's what you are) the authority to enroll the child in school, seek and obtain medical care, and make a lot of other decisions. The parents can revoke the agreement at any time. Under this arrangement, you have the power to make decisions and take action, and the parents do not lose any rights. There are no court costs or lawsuits involved in doing this. There is an online form created by the State of Texas. If you use this form, follow the instructions PERFECTLY or have an attorney review it for you.
2. CONSERVATORSHIP. You can file a lawsuit seeking sole managing or joint managing conservatorship of the child. If the parents agree, you can all sign an agreed order without going to trial. You should have an attorney draft the papers to make sure they are in proper order. This is a court proceeding so it is formal, more expensive, and the parents cannot revoke it. In effect, they would be giving up some of their rights by signing this.
3. GUARDIANSHIP. If the parents have just disappeared and you don't know how to get in touch with them or you can't get any other authorization mechanism in place, you can sue for guardianship. You absolutely must have an attorney to do this.
I am very familiar with the courts in Dallas County and I know that they will do what they can to protect the child's interests.
Get an experienced family law attorney to file a suit affecting parent child relationship for you. Don't try to do this by yourself.
I am not intending this to be legal advice, because I don't know the particulars of your situation. Call me if you would like to discuss this or other isues.
You're going to need an official court document. If the child's lived here, you can file a suit affecting the parent-child relationship. If they're not going to sign an order willingly, you're going to have to demonstrate that you've been in possession of him for at least 6 months and that you having custody is in the child's best interest.
I'd ask a local attorney to handle it. Something like this will be relatively cheap.
Sign up to receive a 3-part series of useful information and advice about child custody law.