Nature miracle works great on cat pee. Getting him neutered will help a lot with inappropriate urination. If he has not had his vaccines updated that should be done too, especially if he goes outdoors. He should also be tested for Feline leukemia and FIV if he has not been. If you haven't done it yet because you are worried about cost, there are usually several low cost options if you look into in your area. Also try two litterboxes if different areas of the house and you can try a different type of litter, some cats prefer one type of litter. The areas where he has peed need to be cleaned really well so that there is no odor for the cat in those areas. You can use a black light to see if there are any stains. Nature's miracle works great on carpet, tile, etc too. One of our cats used a downstairs room a couple of times after we had a pipe burst in the winter. We added nature's miracle to the carpet cleaner to make sure we got everything out and she has not gone down there again.
So long story short 1. get him neutered and up to date on vaccines, tested for feline leukemia and FIV if needed. Also make sure there is no medical reason he is urinating in the house. 2. Add a second litterbox in another area of the house if possible. 3. Try a different type of litter maybe. 4. Make sure to clean all the areas he has gone really well with an enzyme cleaner (nature's miracle or something similar)
Good luck to you and hope you can keep him!