The typical approach to playing guitar solos is to react to a chordsequence. Nothing wrong there, it is a skill to play the right tones over the right chords. Instead of reacting to a harmony created by the chords why not play a melody which is independant from the chords? Creating a melody where you do not have to think about the chords gives you the freedom to play whatever you want to hear. Once you have a melody you can start thinking about which chords would support this melody, but let us for now focus on the melody first:
How do you create a melody you may wonder? You can play a riff you know and add some new notes to this riff which will turn the riff into something of your own. Instead of this why not start with material from fresh? Just play a few notes, hum these notes and see if you can expand these notes with something new which will turn the whole thing into a melody. Whatever you do you cannot go wrong as long as you play something you enjoy you are on the right track.
Once you have your melody the next step is to change this melody from time to time since we are playing a solo and not just one single vocal melody.
Start your melody and then progress with same melody in a higher position on the fretboard. As you progress change the notes from time to time, you can add little crazy twists to spice up the melody, things like harmonics or some bends, anything you can think of really. Listen to Jeff Beck who is a master at this game. Jeff’s playing is not so much about chords, it is all about melody, riffs and how to manipulate the melody with all kind of sounds. Sometimes these sounds come from effects, but most of the time the sounds come from his inventive use of hands and whatever he can think of the guitar can sound like. Try some of his ideas for yourself, get into the mindset of what to do and work on whatever you need that you cannot do at the moment.
Once you have some melodies and variations of these melodies look at how to expand the solo. One way of doing this is by adding some new harmonic ideas: Add in a few chords to spice up the melody, see how this changes the rhythm of the solo. Adding a few extra chords will turn the solo into a small composition. Small compositions are often more fun to play compared to a handful of riffs which do not have any musical connection. Small compositions do have the feel of a short song, they are also easier to play to an audience since they can hear something of a song.
You can build on creating a handful of these small compositions, play them from time to time and develop them into something even bigger, some of them may even become complete songs.
Good luck, keep listening and hope to catch you soon again.