Double emulsion formation in a hierarchical flow-focusing channel is systematically investigated using a free-energy ternary lattice Boltzmann model. A three-dimensional formation regime diagram is constructed based on the capillary numbers of the inner (Cai), middle (Cam) and outer (Cao) phase fluids. The results show that the formation diagram can be classified into periodic two-step region, periodic one-step region, and non-periodic region. By varying Cai and Cam in the two-step formation region, different morphologies are obtained, including the regular double emulsions, decussate regimes with one or two alternate empty droplets, and structures with multiple inner droplets contained in the continuous middle phase thread. Bidisperse behaviours are also frequently encountered in the two-step formation region. In the periodic one-step formation region, scaling laws are proposed for the double emulsion size and for the size ratio between the inner droplet and the overall double emulsion. Furthermore, we show that the interfacial tension ratio can greatly change the morphologies of the obtained emulsion droplets, and the channel geometry plays an important role in changing the formation regimes and the double emulsion sizes. In particular, narrowing the side inlets or the distance between the two side inlets promotes the conversion from the two-step formation regime to the one-step formation regime.