The purpose of this document is to discuss the scientific case of a space mission to the ice giants Uranus and Neptune and their satellite systems and its relevance to advance our understanding of the ancient past of the Solar System and, more generally, of how planetary systems form and evolve. As a consequence, the leading theme of this proposal will be the first scientific theme of the Cosmic Vision 2015-2025 program: What are the conditions for planetary formation and the emergence of life? In pursuing its goals, the present proposal will also address the second and third scientific theme of the Cosmic Vision 2015-2025 program, i.e.: How does the Solar System work? What are the fundamental physical laws of the Universe? The mission concept we will illustrate in the following will be referred to through the acronym ODINUS, this acronym being derived from its main fields of scientific investigation: Origins, Dynamics and Interiors of Neptunian and Uranian Systems. As the name suggests, the ODINUS mission is based on the use of two twin spacecraft to perform the exploration of the ice giants and their regular and irregular satellites with the same set of instruments. This will allow to perform a comparative study of these two systems so similar and yet so different and to unveil their histories and that of the Solar System.