A search for baryon number violation (BNV) in top-quark decays is performed using pp collisions produced by the LHC at sqrt(s) = 8 TeV. The top-quark decay considered in this search results in one light lepton (muon or electron), two jets, but no neutrino in the final state. Data used for the analysis were collected by the CMS detector and correspond to an integrated luminosity of 19.5 inverse femtobarns. The event selection is optimized for top quarks produced in pairs, with one undergoing the BNV decay and the other the standard model hadronic decay to three jets. No significant excess of events over the expected yield from standard model processes is observed. The upper limits at 95% confidence level on the branching fraction of the BNV top-quark decay are calculated to be 0.0016 and 0.0017 for the muon and the electron channels, respectively. Assuming lepton universality, an upper limit of 0.0015 results from the combination of the two channels. These limits are the first that have been obtained on a BNV process involving the top quark.