Based on your description i am thinking either a fracture or a slipped tendon,both are painful. Bring him inside,soak him in warm water(helps pain and may relax him)give him a aspirin(either a low dose 81mg or a reg 325mg) for pain,dose is 25mg per lb of body weight,give orally(break into pieces and wrap in a pce of meat or cheese) or dissolve one 325 mg aspirin in 1 gallon of water. Give him the aspirin about 20 minutes prior to checking leg,you are trying to reduce pain before treating.
To check for a slipped tendon(you can do this while he is in warm water,may make him more relaxed)run your thumbs down back of is leg from hock(leg joins body)to shank(scales start)gently press down while doing this. If tendon has slipped you can feel it,it will feel loose/springy almost feels like an elastic band(compare to other leg so you can feel the difference)press down you should feel it snap back into place. You may have to press into place several times a day or wrap to keep in place.
To check for a fracture(check at the point where leg is twisted)gently feel up and down leg,can you feel a break? If yes,you can splint leg. Keep him inside,keep him warm(when ill/injured birds cannot regulate body temp)keep him quiet and calm. Make sure he is eating/drinking.