A radio frequency quadrupole (RFQ) and drift tube linac (DTL) in the proton linac of ESS are connected with a medium energy beam transport (MEBT). The MEBT removes low quality bunches in the head and tail of a macro-pulse with a chopper and houses diagnostic devices to characterize and adjust the beam out of the RFQ for the DTL. These must be achieved within a relatively short space and without significant degradation of beam quality due to the space-charge force, imposing a challenge on its lattice design. This paper presents a beam physics design of the MEBT in the ESS Linac, which satisfies its requirement while preserving a decent beam quality.