Three-nucleon forces (3NF) are investigated from two-flavor lattice QCD simulations. We utilize the Nambu-Bethe-Salpeter (NBS) wave function to determine two-nucleon forces (2NF) and 3NF in the same framework. As a first exploratory study, we extract 3NF in which three nucleons are aligned linearly with an equal spacing. This is the simplest geometrical configuration which reduces the huge computational cost of calculating the NBS wave function. Quantum numbers of the three-nucleon system are chosen to be (I, J^P)=(1/2,1/2^+) (the triton channel). Lattice QCD simulations are performed using N_f=2 dynamical clover fermion configurations at the lattice spacing of a = 0.156 fm on a 16^3 x 32 lattice with a large quark mass corresponding to m_pi= 1.13 GeV. We find repulsive 3NF at short distance in the triton channel. Several sources of systematic errors are also discussed.