This paper is concerned with a boundary Nevanlinna–Pick interpolation for Nevanlinna matrix functions and the Hamburger matrix moment problem but with specified constraints that the nonnegative matrix-valued measure has no mass distributions at a finite number of real points. Intrinsic connections between these two problems are established by the so-called Hankel vector approach. The connections, together with the theory of matrix moments and the theory of matrix polynomials with respect to a positive Hermitian block Hankel matrix due to H. Dym, enable us to get a solvability criterion and a parameterized description of all the solutions for each of these two problems.