We demonstrate a method to determine the Brownian motion and the diffusion coefficient of a nanoparticle in water in a plane that is parallel to a solid boundary and as function of the distance normal to that boundary by using an optical tweezers instrument. A solution of 190 nm-diameter fluorescent polystyrene nanoparticles in de-ionized (DI) water is introduced in a micro-chamber built from two thin glass substrates. A single particle is trapped by the tweezers and optically moved in the z-direction normal to a substrate. By analyzing a scatter plot of the time-dependent positions of the nanoparticle in the x-y plane in a histogram, the diffusion coefficient parallel to the substrate of the Brownian particle constrained by the substrate is determined as a function of the distance between the substrate and the nanoparticle. The experimental results indicate the increased drag effect on the nanoparticle when it is close to the substrate, as evidenced by an experimental diffusion coefficient nearby the substrate that is about half of that of the particle in the bulk fluid.