It's best to take it to a vet since the pus will need to be cleaned out, a culture and sensitivity test done and the chameleon put on a course antibiotics.
I have dealt with chameleons that have had broken nails and minor infections/wounds. You can clean it out yourself. Get as much pus out as you can and clean it it out with a chlorhexidine solution (available online). I like to use a product called vetericyn hydrogel. (also available online)
I've used this process many times with good results on rescues and WC chameleons that have come in the wounds/broken nails/etc. You just need to watch him closely and make sure it begins to heal and not spread.