Invest in some good-quality equipment. Heavy metal solos are quite different from other solos because they encourage a fast, furious and complicated style instead of a slow, simple and straightforward one. You should therefore be comfortable with the guitar: ensure that your fingers have the space to move freely and quickly around the fretboard.
You should also have an amplifier that has a good level of output volume: heavy metal is a loud genre. Learn how to tune your guitar to the most common heavy metal tunings: drop B tuning, drop C tuning, drop D tuning, Eb tuning and G tuning.
Purchase an effects pedal that allows you to experiment with many different guitar effects. Heavy metal solos come in a variety of sounds and styles. Pantera's guitar solo in "Cemetery Gates," for example, has a clean, cutting sound, but In Flames' solo on "Alias" has an acoustic, rusty sound. Practice with different sound and tone variations until you get the desired result.
Improve your finger movement and speed; heavy metal solos are renowned for being intricate, fast and furious. You can improve your finger movement by practicing running scales, as taught by Edward Cupler on Guitar Metal's website.
Learn some key guitar solo skills. Heavy metal solos are unique because they use tremolo tapping and pinched harmonics. Tremolo tapping is the process of playing a quick series of harmonic notes by using both hands on the fretboard, while pinched harmonics are high-pitched guitar screams produced by using the guitar pick and the fleshy parts of your playing fingers.
To perform a pinched harmonic, strike the string with the guitar pick before immediately catching it with the fleshy part of your thumb. If you hear a high-pitched, shrill sound, then you have performed a pinched harmonic. Holding the pick at a slight angle between your thumb and index finger should expose enough of your thumb to pinch the note.
Play and practice as many existing heavy metal solos as you can. This will not only help you to understand the different types and styles of solo, but will give you ideas for your own personally created solos.