That will work, but isn't the best way. In the audio wizard you have to check some boxes telling it to use mic and line in for that. While I havn't used a real 5.1 system, I have played with a makeshift 4.1 system (a 2.1 and a 2.0 put together.) In the Soundstorm control panel, I set it to 4 speakers. Plugged my 2.1 into the regular speaker jack (green) and the 2 extra speakers into orange. It worked fine.
With 5.1, it should work with the front left and right in green, center and sub in black, and rear left and right in orange. You can use the mic (pink) and line in (blue) instead of black and orange, but you lose line in and mic.