I concur with most of what has been posted already: check him out thoroughly tonight, see if it is broken, dislocated, or just swollen/injured.
Regardless of which it is, it seems he is in pain. You can give him
ibuprofin this is a link to some pain management links (thanks again,
@RoyalChick !)
Also, whether it is broken or just injured, you want him off of it if possible. You can create a sling with an old towel, a plastic box/crate, and a few strong clips. Make sure the box is long enough, and deep enough. Cut two slits for his legs (approximately the width apart his are!) You will then put feet through slits, drape edges of towel over sides of box, and clip towel to box to support him. He probably will not want to stay...... if this is the case, and he struggles to free himself, then you will need to burrito him with the towel ( or a second towel, again with slits cut for legs) With this set up, if you place him correctly, you can hook cups on the plastic bin for food and water. (note, the burrito doesn't have to be tight - just secure enough to keep him from using his wings to launch him out of crate)
Sorry, I don't have a picture of when I did this for my little hen that broke her leg, but I did have to burrito her...and it worked wonderfully. Note that this sling allows the leg to hang naturally, and allows him to still move the leg/foot, but without putting weight on it. The height should be so that with his good leg, he can stand and his body weight can just come off the sling - so, not too high his good foot can't reach the floor, and not so low that his bad leg has to be scrunched/significantly bent to not have weight on it.
If it isn't broken, and seems to be doing better in a few days...then I would crate him - probably with a friend until he is healed enough to get around fine.
If it is broken, it is important to immobilize the broken area with a splint - being sure bone is correctly set - or as much as possible, and do the same sling thing. Stay in splint and sling until bone is knit (10 days to 2 weeks - you should check it), and then keep him quiet for another week, but not in sling, so bone is fully healed before he goes out to be in charge of ladies.
Note: I have found that chickens can get depressed being isolated. With the broken bone, you would have to be very careful that it doesn't get bumped/jarred, etc until it knits. Otherwise, I would suggest having a friend in - even if only for a while every day - to keep him company. Given he is a fairly young roo, I would suggest an older, calm hen, and not first thing in the morning when hormones are the highest!.
Please give us an update either later tonight or tomorrow - after you have given him a once-over to determine what is wrong.