A new era in space is approaching fast. Soon, several miniaturised probes will permeate the inner Solar System, by targeting the abundantly variegated minor bodies in it. The space sector is enthusiastically embracing a new paradigm for space science and exploration, carried out by interplanetary CubeSats. Nevertheless, the current modus operandi can hamper this momentum: while the system development costs scale with its size, the same is not true for flight dynamics operations, which are still expensively performed from ground, so requiring personnel and ground assets, which -at this pace- will soon saturate. Self-driving spacecraft are the solution: futuristic probes shall travel in a totally autonomous fashion, inferring their position from the surrounding environment and computing their guidance trajectory onboard. If proven feasible, this technology will boost large missions as well. Yet, while research on autonomous navigation techniques is advancing, progresses on autonomous guidance are scarce. The state of the art of autonomous guidance and control algorithms does not guarantee acceptable levels of robustness, optimality, and sustainability. Sequential Convex Programming methods seem to be the most promising. Yet, there is a considerable gap to fill toward real, in-flight implementation. These are the motivations behind the proposed co-founded research in the form of a PhD, in conjunction between Politecnico di Milano and ESA. The main goal is shifting the guidance and control operations from ground to aboard CubeSats. Moreover, the challenge is to develop reliable guidance and control algorithms considering the skeletal budgets of nano-spacecraft. Significant advancements of the devised guidance method may lead to an in-flight experiment to be performed by M-ARGO CubeSat in deep space. If successfull, this technology will disrupt completely the way spacecraft are piloted towards their targets.