We present the design of a next-generation experiment, n2EDM, currently under construction at the ultracold neutron source at the Paul Scherrer Institute (PSI) with the aim of carrying out a high-precision search for an electric dipole moment of the neutron. The project builds on experience gained with the previous apparatus operated at PSI until 2017, and is expected to deliver an order of magnitude better sensitivity with provision for further substantial improvements. An overview is of the experimental method and setup is given, the sensitivity requirements for the apparatus are derived, and its technical design is described.