In the present paper a method of finding the dynamics of the Wigner function of a particle in an infinite quantum well is developed. Starting with the problem of a reflection from an impenetrable wall, the obtained solution is then generalized to the case of a particle confined in an infinite well in arbitrary dimensions. It is known, that boundary value problems in the phase space formulation of the quantum mechanics are surprisingly tricky. The complications arise from nonlocality of the expression involved in calculation of the Wigner function. Several ways of treating such problems were proposed. They are rather complicated and even exotic, involving, for example, corrections to the kinetic energy proportional to the derivatives of the Dirac delta–function. The presented in the manuscript approach is simpler both from analytical point of view and regarding numerical calculation. The solution is brought to a form of convolution of the free particle solution with some function, defined by the shape of the well. This procedure requires calculation of an integral, which can be done by developed analytical and numerical methods.