The TJ-II stellarator neutral-beam injection (NBI) system, vacuum vessel and magnetic configuration have been included in the orbit-following Monte Carlo code ASCOT5 to simulate neutral-beam heating and current drive for high-density NBI plasmas. Co- and counter-injection beams are simulated separately. A scan in both electron density and temperature is carried out within the range of values corresponding to realistic high-density NBI plasmas, for which a low level of fast-ion losses due to charge-exchange reactions is expected, since the version of ASCOT5 used in the paper does not include such processes. The rest of the kinetic profiles (ion temperature, radial electric field and effective charge) are kept fixed. The initial distribution of markers shows that the amount of available power in the plasma carried by the beam ions depends slightly on the electron temperature and on the injection direction (co/counter). The steady-state fast-ion distribution function is obtained and used to calculate the three-dimensional fast-ion density, the neutral-beam driven current and the amount of power deposited to the plasma in the two injection scenarios. These three quantities are higher in the counter-injected case due to a lower amount of promptly lost particles. The neutral-beam current drive (NBCD) has been calculated using the fast-ion beam current given by ASCOT5 and the electron return current, which is computed with the analytic solution of the drift kinetic equation for electrons in the presence of fast ions in the low-collisionality regime. Neither the calculated fast-ion density nor the NBCD are flux functions, in consistency with the fact that fast-ion drift surfaces and flux surfaces are generally not aligned.