Ulysses used Jupiter in 1992 to reach a polar orbit around the Sun.
The joint ESA–NASA spacecraft launched in 1990 to study the Sun from high latitudes, regions that are difficult to observe from Earth’s near-ecliptic viewpoint. A direct launch into a steeply inclined solar orbit would have required enormous energy, so mission planners used Jupiter’s gravity as a redirecting assist.
Ulysses passed close to Jupiter on February 8, 1992. The giant planet’s gravity bent the spacecraft’s trajectory out of the Solar System’s main orbital plane and increased its inclination by about 80 degrees. This placed Ulysses into a roughly six-year heliocentric orbit passing over the Sun’s north and south poles.
The spacecraft was launched aboard Space Shuttle Discovery, which is why it can be confused with Discovery in this question. Discovery delivered Ulysses to space; Jupiter’s gravity, not the shuttle, created its unusual solar orbit. Ulysses conducted three major high-latitude scans before operations ended in 2009.