Take the gun apart, and MAKE SURE the firing pin, AND the firing pin block are both working.
If you have an OLDER model USP, it may not have the "half ####" function, and if the firing pin block were to break, the gun would fire when decocked.
You can do something, like put a pencil into the barrel (with gun pointing up) and "decock" it and see if the pencil moves. Also, take the slide OFF (do a field strip) and try to push the firing pin from the back, and see if it moves more than 1 or 2 mm. If it does (and you can see the firing pin protrude from the firing pin hole) then the firing pin block and/or the firing pin is damaged. (in order to see the firing pin protrude, you'll need to use something like a pen to poke into the back of the firing pin. It should move about 5mm or so)
If it doesn't move, then try pushing down the firing pin block (can do with hand) and see if it moves. It may be a problem with the frame. Try using the decocker, and see if the "Sear Actuator" (part beside the disconnecter - to the left side with gun pointing downrange) moves up. It should NOT. it should only move when the trigger is pulled!
This is not impossible, but VERY RARE. HK will replace it for you.
There were a bad batch of firing pins (in 2000 or 2002 IIRC) that were prone to breakage... If it broke at a place after the firing pin block, it MAY potentially be causing enough force to hit the primer.
Also, this is all moot if the gun is new. It should only decock to half-#### position.
If the gun is older, it may still decock to the fully "uncocked" position, and be resting on the firing pin.
In any case, the gun is damaged, send it back to HK to get it fixed.
You didn't take the firing pin block out, did you? This will help make the trigger pull better, but will destroy that safety, and if its an older model (like state) you just made the decocker into a second trigger. (not blaming, just gotta ask. This has been done before so im just making sure!)