I would take your chameleon to a good chameleon vet. The MBD needs to be corrected as well as your husbandry so the MBD won't return.
You will likely be given a good liquid calcium for your chameleon to give to him on a regular basis until the MBD is corrected. He may be left with the crooked legs that he has now from the MBD but the bones, muscles and other things affected by the MBD should be fixed.
In addition to the liquid calcium, you will need to provide your chameleon with a good UVB light, proper temperatures, well fed/gutloaded insects dusted with proper supplements.
The most recommended UVB lights are the long linear Reptisun 5.0 or Arcadia 6 tube light.
@Beman can give you more information about this.
There should be no lights on at night and no coloured lights used. For basking it's recommended that you use a regular incandescent household bulb (not an LED) of a wattage that provides a basking temperature of 80F. You should also test the position of the light so it won't burn your chameleon by placing your hand, palm side down under the light against the screen...if you want to move it, then it's too hot and may burn him.
You can feed crickets, roaches, silkworms, BSFL, locusts on a regular basis and for treats, waxworms, superworms, hornworms.
Crickets, roaches, locusts, superworms can be fed a wide variety of greens such as dandelions, kale, collards, endive, escarole, and veggies such as carrots, sweet potato, sweet red pepper, zucchini, squash, etc, and a very small amount of berries, apples, pears, cantaloupe, etc.
For supplements, for years I have used Rep-Cal phos free calcium powder dusted lightly on all the insects just before feeding them to the chameleon at all feedings but one a week. On that one feeding, I alternate between Rep-Cal phos free calcium/D3 powder lightly dusted on the insects and Herptivite vitamin powder. Keep in mind that herptivite has prOformed vitamin A in it and it's likely that most chameleons need some prEformed vitamin A, so that will have to be given separately OR you can use a different vitamin powder that has it in instead of the Herptivite.
How much have you been feeding your chameleon each week lately? Size of the insects?
Once the MBD is corrected, you can drop the liquid calcium...but keep the rest of the supplements and other things I indicated the same.
The hospital cage idea already suggested to you is a good one until your chameleon recovers.
Good luck!