A mathematical model based on the method of conditional moments combined with a new notion of the energy-equivalent inhomogeneity is presented and applied in the investigation of the effective properties of a material with randomly distributed nanoparticles. The surface effect is introduced via Gurtin–Murdoch equations describing the properties of the matrix/nanoparticle interface. The real system, consisting of the inhomogeneities and their surfaces possessing different properties and, possibly, residual stresses, is replaced by energy-equivalent inhomogeneities with modified bulk properties which incorporate the surface effects. The effective stiffness tensor of the material with so defined equivalent inhomogeneities is determined by the method of conditional moments. Closed-form expressions for the effective moduli of a composite consisting of a matrix and randomly distributed spherical inhomogeneities are derived for both the bulk and the shear moduli. Dependence of those moduli on the radius of nanoparticles is included in these expressions exhibiting analytically the nature of the size-dependence in nanomaterials. As numerical examples, nanoporous aluminum and nanoporous gold are investigated. The dependence of the normalized bulk and shear moduli of nanoporous aluminum (for two sets of surface properties) on the pore volume fraction (for different radii of nanopores) and on the radius of nanopores (for fixed volume fraction of nanopores) are compared to and discussed in the context of other theoretical predictions. Further, the normalized effective Young’s modulus of nanoporous gold as a function of void volume fraction for various ligament radii is analyzed.