You're getting entirely too much ammonia, much more than a single Betta can produce. Take Lizzie's advice and thoroughly clean out that tank and start from the beginning. Do not clean out the filter. You might still have some nitrifying bacteria in there.
If your fish is not in robust good health, I would not recommend a fish-in cycle. You can keep him in his 5g with adequate water changes to keep ammonia below 0.25ppm.
You might want to fishless cycle the filter in a small tank or even a bucket. Put the filter into the show tank when it's cycled. This is much safer for a weak fish.
Read all you can about cycling.