Qui-Gon is apparently the first jedi to become a ghost...he found a way to do it and eventually obi-wan and yoda discover this secret. In episode II, when anakin kills the tuskens when the scene cuts to yoda you can hear Qui-Gons voice scream Anakin twice and then screams no. It is supposed to be explained in episode III