Existing answers are missing the momentum conservation side of this.
Since escape velocity is $\sqrt 2$ times orbital velocity, the most efficient approach is to increase the Earth's speed by a factor of $\sqrt 2$ in one impulse. Due to the Oberth effect, that's more efficient than a continuous impulse. And the smallest velocity change is achieved if you accelerate along the direction that the Earth is already moving.
However, calculating the energy needed is much more complicated than simply calculating the velocity change, because you can't just insert energy to change a body's velocity. Momentum has to be conserved. Thus, the amount of energy that this maneuver will cost you depends on how much of the Earth's mass you are willing to shed. This is analogous to how $\sim 90\%$ of the mass of a typical rocket consists of propellant.
If you're willing to shed an arbitrary amount of mass, then you can escape the solar system using arbitrarily little energy. Just imagine launching a particle from the Earth (thereby shedding the whole Earth).
More generally, suppose the Earth has mass $M$ and you want it to retain mass $M^\prime$. The Earth has orbital velocity $V$, and you need it to have velocity $\sqrt 2 V$, so the Earth after the impulse moves at velocity
$$\Delta V=(\sqrt 2-1)V$$
relative to the Earth before the impulse. The mass $(M-M^\prime)$ left behind is ejected with velocity $v$ relative to the pre-impulse Earth. By momentum conservation,
$$M^\prime \Delta V = (M-M^\prime)v,$$
i.e.
$$v=\frac{M^\prime}{M-M^\prime}\Delta V.$$
The energy required (in the frame of the pre-impulse Earth) is then
$$
\begin{align}
E&=\frac{1}{2} M^\prime \Delta V^2 + \frac{1}{2}(M-M^\prime)v^2
\\
&=\frac{1}{2} \frac{M M^\prime}{M-M^\prime} \Delta V^2.
\end{align}$$
Notice that as the mass $M^\prime$ that you want to bring approaches 0, the energy required approaches 0. On the other hand, as $M^\prime$ approaches $M$ (you want to bring the whole Earth), the energy required approaches infinity.
One caveat is that this is a nonrelativistic calculation. In terms of relativity, the "high energy, low mass loss" limit is a photon rocket, which doesn't have to expel its mass directly. But that takes astronomical amounts of energy, which is equivalent to mass, so it has to lose mass in the end anyway.
Also, I've neglected the energy required to gravitationally unbind the propelled part of the Earth from the portion left behind.