inb4 tl;dr
What do you need:
- An electric guitar
- A hardware amplifier (optional)
- A computer with installed FL Studio or other DAW and NI Guitar Rig
This tutorial is dedicated to all guitarists, who at least once time got frustrated about his/her electric guitar sounding shitty when recording directly (or through amplifier, no matter) to computer. In this tutorial I will be using FL Studio 10 buit-in plugins and Guitar Rig virtual guitar effects rack, but it's also suitable for any other DAW which have similar mixing tools.
First of all, let's construct your wiring system to record.
1) If you have an amplifier, connect your guitar to amp's "In" plug, and, (using 1/4" TRS to minijack adapter if needed) "Out" plug to computer's sound input plug. Sound input could be microphone (red one) or line-in (black one).
Be careful if you connect your amplifier to microphone input! It can destroy your sound card if you are using high amplifier levels!
2) Open FL Studio, go to an empty mixer channel and choose your recording input in the "In" list.
Here we go, your guitar is now routed to your DAW directly. There can be some latency if your processor is slow, that's all right.
Now try playing some chords. No, not the same deadmau5 did, but if you can play them on guitar, that's pretty badass. Your guitar sounds muflle, noisy and thick? Predictable, that's the reason why you are here. Next steps will show you some tips to make it at least 20% cooler.
First of all, try recording clear sound. Check if its level is appropriate, not too low and not too high.
If input level is too high, it will cause an obnoxious effect called clipping.

It's a rough distortion which occurs when sound level peaks beyond maximum ceiling, thus causing the highest peaks "clipping" down to this ceiling. Don't worry if you hear this (it sounds like sandy, very rough and unpleasant, as said above, distortion). If you hear an obvious clipping, try adjusting your hardware output a little quieter.

I use NuxFX Mighty 8 amp, and I always record with very low output volume.
If it doesn't help, add Limiter to your effects rack.

If you want to apply effects on already recorded sound, don't mind denoising it. Denoising can be done in Edison, audio clip editor. To denoise track, select a little area with only noise in it and acquire noise profile, and only then apply "Clean up" option.

http://soundcloud.com/eternalinsomniac/guitar-tutorial-step-1
Well, here we go. A clean recording or, likewise, live wiring is ready. What to do next? We need a digital amplifier to actually make guitar sound nice. The best amplifier/virtual effects rack so far is Native Instruments Guitar Rig. Yeah. Who doesn't know it, hm? This time we'll need only a cabinet. It's a type of amplifier, which makes sound more colourful, juicy and analogue-esque. Matched Cabinet unit is perfect for our purpose. Try adjusting all the knobs in it, and you'll certainly pal up with that thingy (there's a factory preset called Dubstar, it's a perfect example, just don't forget turning off all the reverbs and echoes).


http://soundcloud.com/eternalinsomniac/guitar-tutorial-step-2
After adding Guitar Rig effect there might appear some unwanted effect which appears as little clicks along all the recording. Don't worry, just put a Limiter before Guitar Rig and lower the maximum volume ceiling.

After we get finished with Guitar Rig, it's time for some additional effects. Yeah! Overdrive will make sound sharper, WaveShaper can stand as sound fattener. And don't forget the equalising!
http://soundcloud.com/eternalinsomniac/guitar-tutorial-step-3
