Process for hydrocracking hydrocarbon-containing feedstocks containing at least 20% by volume and preferably at least 80% by volume of compounds boiling above 340°C, said process comprising at least the following stages: a) Hydrocracking said feedstocks operating, in the presence of hydrogen and at least one hydrocracking catalyst, at a temperature comprised between 250 and 480°C, under a pressure comprised between 2 and 25 MPa, at a space velocity comprised between 0.1 and 6 h-1 and at a quantity of hydrogen introduced such that the volume ratio litre of hydrogen/litre of hydrocarbon is comprised between 100 and 2000 L/L, b) Gas/liquid separation of the effluent originating from stage a) in order to produce a liquid effluent and a gaseous effluent comprising at least hydrogen, c) Sending the gaseous effluent comprising at least hydrogen into a compression stage before it is recycled into at least the hydrocracking stage a), d) Fractionation of the liquid effluent into at least one effluent comprising the converted hydrocarbon-containing products having boiling points less than 340°C and an unconverted liquid fraction having a boiling point greater than 340°C, e) Hydrocracking said unconverted liquid fraction originating from stage d) operating, in the presence of hydrogen and a hydrocracking catalyst comprising a hydrogenating function comprising at least one metal from Group VIII selected from iron, cobalt, nickel, ruthenium, rhodium, palladium and platinum and/or at least one metal from Group VIB selected from chromium, molybdenum and tungsten, alone or as a mixture, and an acid function selected from silica-alumina and zeolites, at a temperature comprised between 250 and 480°C, under a pressure comprised between 2 and 25 MPa, at a space velocity comprised between 0.1 and 6 h-1 and at a quantity of hydrogen introduced such that the volume ratio litre of hydrogen/litre of hydrocarbon is comprised between 100 and 2000 L/L, f) Hydrotreating all of the effluent originating from stage e) in a mixture with a hydrocarbon-containing liquid feedstock comprising at least 95% by weight of compounds boiling at a boiling point comprised between 150 and 400°C, separate from said effluent originating from the second hydrocracking stage e), said hydrotreating stage f) operating in the presence of hydrogen and at least one hydrotreating catalyst comprising at least one amorphous alumina support and at least one hydro-dehydrogenating element selected from at least one non-noble element from Groups VIB and VIII, at a temperature comprised between 200 and 390°C, under a pressure comprised between 2 and 16 MPa, at a space velocity comprised between 0.2 and 5 h-1 and at a quantity of hydrogen introduced such that the volume ratio litre of hydrogen/litre of hydrocarbon is comprised between 100 and 2000 L/L. a) Hydrocracking said feedstocks operating, in the presence of hydrogen and at least one hydrocracking catalyst, at a temperature comprised between 250 and 480°C, under a pressure comprised between 2 and 25 MPa, at a space velocity comprised between 0.1 and 6 h-1 and at a quantity of hydrogen introduced such that the volume ratio litre of hydrogen/litre of hydrocarbon is comprised between 100 and 2000 L/L, b) Gas/liquid separation of the effluent originating from stage a) in order to produce a liquid effluent and a gaseous effluent comprising at least hydrogen, c) Sending the gaseous effluent comprising at least hydrogen into a compression stage before it is recycled into at least the hydrocracking stage a), d) Fractionation of the liquid effluent into at least one effluent comprising the converted hydrocarbon-containing products having boiling points less than 340°C and an unconverted liquid fraction having a boiling point greater than 340°C, e) Hydrocracking said unconverted liquid fraction originating from stage d) operating, in the presence of hydrogen and a hydrocracking catalyst comprising a hydrogenating function comprising at least one metal from Group VIII selected from iron, cobalt, nickel, ruthenium, rhodium, palladium and platinum and/or at least one metal from Group VIB selected from chromium, molybdenum and tungsten, alone or as a mixture, and an acid function selected from silica-alumina and zeolites, at a temperature comprised between 250 and 480°C, under a pressure comprised between 2 and 25 MPa, at a space velocity comprised between 0.1 and 6 h-1 and at a quantity of hydrogen introduced such that the volume ratio litre of hydrogen/litre of hydrocarbon is comprised between 100 and 2000 L/L, f) Hydrotreating all of the effluent originating from stage e) in a mixture with a hydrocarbon-containing liquid feedstock comprising at least 95% by weight of compounds boiling at a boiling point comprised between 150 and 400°C, separate from said effluent originating from the second hydrocracking stage e), said hydrotreating stage f) operating in the presence of hydrogen and at least one hydrotreating catalyst comprising at least one amorphous alumina support and at least one hydro-dehydrogenating element selected from at least one non-noble element from Groups VIB and VIII, at a temperature comprised between 200 and 390°C, under a pressure comprised between 2 and 16 MPa, at a space velocity comprised between 0.2 and 5 h-1 and at a quantity of hydrogen introduced such that the volume ratio litre of hydrogen/litre of hydrocarbon is comprised between 100 and 2000 L/L.