Deadmau5 started out as a web developer and created music as a hobby. It was during his time when bandwith became good enough for sites to support music and playlists and because of that a lot of sites were looking for music producers to make their sites 'cooler', and deadmau5 threw himself at that. Eventually he gained recognition by that and, as midimachine says, got signed to Sectionz Records, released 'Get Scraped' and then the rollercoaster began. He was, just like 99% of all the famous producers, at the right place at the right time.
Also yes, deadmau5 was his username on an IRC chat because he found a dead mouse in his computer. He wanted to call himself 'deadmouse' or 'deadmause' but he couldn't use more than 8 characters for his name so it became 'deadmau5'.
In case nobody had noticed, I'm obsessed with deadmau5.