This is fixable, but may be any level of difficulty. It depends on how the strands of cable have moved and whether the cable head is caught.
Given its your rear shifter, its on the Right side of the bars, and there's a port for the cable outer to seat in on the left side. When you shift down (to an easier gear/bigger rear cog), the whole brake lever rotates, and holding the lever there will show the access hole on the right/outboard side.
Moving only the upshift lever (the smaller one behind the brake lever) won't show the hole.
Your next task is to hold the lever across, and try to make the cable head fall out the right hand side access hole, by hook or by crook. The head may not fit through the hole sideways, it may have to come through flat-face first.
Some ideas to help manipulate it...
- More Light! You need to see, so use at least two bright lights. I have a pair of 200W desk lamps over my bench, which helps avoid shadows.
- A thin and stiff wire in the left side port to push the head from underneath
- A tiny magnet - depends if the head is steel, or if the cable has enough steel to react to a magnet.
- A tiny sharp pick to help manipulate whatever you can see through the holes.
- Slack off the clamping bolt to rotate the lever hood, get gravity on your side
- Undo the stem to let the bars rotate, again for gravity
- Untape the bars, get the whole shifter body off the bars for easier access.
You might try flushing the mech with light degreaser, in case theres a blop of grease holding it down. However this might have the opposite effect
If that doesn't work, you're probably up for disassembly. Since Shimano shifters are not intended to be serviceable, this can ruin the shifter if done wrong. There's no shame taking the part to a good LBS bike shop for repair.
Have a read of https://bicycles.stackexchange.com/a/35662/19705 where I did a similar recovery on my 7 speed RSX shifter.
There was a useful video at
Gear cables should be replaced whenever shifting starts feeling "a bit weird" or every 10,000 km of road riding, or 5000 km of off-road. It would have been impossible to see this cable fraying in place during inspection though. You should probably replace the left-side cable too, and check the brake cables as well.
Sadly 6600 and 6700 and 5700 shifters were known for munching through cables quite quickly. If it were my bike, I'd replace the shift cables annually whether they need it or not. Cables are cheap.