Let us take a look at our solar system. A body in Earth orbit (ie in the Goldilocks zone where life is most likely to evolve) needs an additional 11 km/s in order to escape into interstellar space. Note that this is the best case scenario, ie where a fast-moving, sufficiently massive body ploughs into the planet from "behind" to provide an extra kick of velocity. If the force is applied from a different direction then the change in velocity required to break solar orbit is much greater.
11 km/s is pretty slow in terms of traversing the interstellar wastes, but it is really moving in planetary orbit terms. Any moon in orbit around a planet that suddenly has 11 km/s of delta v added is probably going to be left behind in a wobbly version of its original planet's orbit around the star. If the moon is really unlucky then the planet will plough through it instead and destroy it.
Ah, but what if the fast moving body had a fragment break off and was travelling parallel to it (defying the laws of gravity), with the ratio of mass between the fragment and the main body being exactly the same as the ratio of mass between the moon and the planet. Then, if the moon is in exactly the right position "next to" the planet and the main body hits the planet and the fragment hits the moon then both planet and moon change velocity by the same amount and can remain as a little orbital system going off into interstellar space. Yes? Well, sort of, but the moon will not be harbouring any life any more. Assume that somehow the impacting body transfers its momentum to the moon over a period of 10 seconds of uniform acceleration (it won't), then it means that the moon is being accelerated at 110 G for those 10 seconds. Goodbye atmosphere, goodbye hydrosphere, goodbye crust, mantle etc, so long and thanks for all the fish.
The only way that such a massive change in velocity can be imparted to both the gas giant and its moon without sterilising both is with many close-but-not-too-close gravitational encounters with massive bodies on optimal trajectories that will gradually tug both the gas giant and moon towards interstellar space. This really cannot happen by accident - to get both planet and moon moving without a Roche limit catastrophe occurring (or even a lesser disaster that eliminates the atmosphere and hydrosphere) would require intelligent design. If this did happen, then a Europa-type situation might be possible, with liquid water under a frozen crust allowing the possibility of life.
Deliberate intent is also needed in order to get the planetary system moving towards a star that they can reach before the planet cools so much that the hydrothermal vents have gone cold. To quote Douglas Adams again - space is big. Really big. The odds against this particular unlikely planet + moon combination reaching a star at the right stage in its fusion cycle and entering a stable orbit in the Goldilocks zone of that star are literally astronomical. Look at Voyager 1 - after being deliberately launched into the cosmos it will pass within 1.6 light years of one star in 40,000 years and within less than 1 light year of another in 300,000 years. For a randomly wandering planet to not just enter the gravitational influence of another planet but to gain a stable orbit in the inner system without deliberate intent is unbelievably improbable.
Which is not to say that you should not use the idea, plenty of people are willing to overlook scientific plausibility in a well-written story. (Far too many have no consideration for science in real life!) Probably best not to try to go into details of how it happened though, just get on with the story.