My first thought is metabolic bone disease, but whatever the cause of this, your lizard needs to see the vet ASAP. If it is MBD, depending on how bad it is, the vet can give injectable, soluble calcium and vitamin D3. A few questions: How old/large is your tegu? Have you been suplimenting with calcium, vitamin D3, other vitamins? Do you have UVB lighting? How long have you had the tegu, what are you feeding?
Any known falls, or anything the tegu could have fallen from? The twitching and leg dragging could be symptoms of spinal injury. Because tegus are terrestrial, they don't handle falls like the arborial species do.
These are just a few thoughts from the research I've done and my experience with other types of lizard. No matter what, take your tegu to a reptile vet as soon as possible. The symptoms you describe don't seem to me to be something simple that you could try and treat with advice from me or anyone else. Keep in touch; I ain't no vet, but I'm good at moral support.
Good luck,
Leslie