The inclusive b (b) over bar- and c (c) over bar -dijet production cross-sections in the forward region of pp collisions are measured using a data sample collected with the LHCb detector at a centre-of-mass energy of 13TeV in 2016. The data sample corresponds to an integrated luminosity of 1.6 fb(-1). Differential cross-sections are measured as a function of the transverse momentum and of the pseudorapidity of the leading jet, of the rapidity difference between the jets, and of the dijet invariant mass. A fiducial region for the measurement is defined by requiring that the two jets originating from the two b or c quarks are emitted with transverse momentum greater than 20 GeV/c, pseudorapidity in the range 2.2 < eta < 4.2, and with a difference in the azimuthal angle between the two jets greater than 1.5. The integrated b (b) over bar -dijet cross-section is measured to be 53.0 +/- 9.7 nb, and the total c (c) over bar -dijet cross-section is measured to be 73 +/- 16 nb. The ratio between c (c) over bar- and b (b) over bar -dijet cross-sections is also measured and found to be 1.37 +/- 0.27. The results are in agreement with theoretical predictions at next-to-leading order.