The IceCube Neutrino Observatory has accumulated a total of 318 billion cosmic-ray induced muon events between May 2009 and May 2015. This data set was used for a detailed analysis of the cosmic-ray arrival direction anisotropy in the TeV to PeV energy range. The observed global anisotropy features large regions of relative excess and deficit, with amplitudes on the order of $10^{-3}$ up to about 100 TeV. A decomposition of the arrival direction distribution into spherical harmonics shows that most of the power is contained in the low-multipole ($ellleq 4$) moments. However, higher multipole components are found to be statistically significant down to an angular scale of less than $10^{circ}$, approaching the angular resolution of the detector. Above 100 TeV, a change in the morphology of the arrival direction distribution is observed, and the anisotropy is characterized by a wide relative deficit whose amplitude increases with primary energy up to at least 5,PeV, the highest energies currently accessible to IceCube. No time dependence of the large- and small-scale structures is observed in the six-year period covered by this analysis. The high-statistics data set reveals more details on the properties of the anisotropy and is potentially able to shed light on the various physical processes that are responsible for the complex angular structure and energy evolution.