This paper investigates the mystery of baryogenesis for isotropic and anisotropic universe models in the context of Rastall’s theory of gravity (RTG). In the first part, we utilize the Rastall field equations (FEs) for the flat Friedmann Robertson Walker (FRW) metric to find the solutions of density [Formula: see text] and Hubble parameter [Formula: see text]. Additionally, Rastall parameter plays a crucial role to discuss baryogenesis and fulfilling its criteria on the observational ground. It is found that very large positive/negative values of Rastall parameter like [Formula: see text] (for [Formula: see text]) and [Formula: see text] (for [Formula: see text]) are required to satisfy the observational bounds on baryon asymmetry factor (BAF), see Fig. 1. In the second part, we develop the FEs for RTG using the Locally Rotationally Symmetric (LRS) Bianchi type-1 line-element. Then we find the solutions of the FEs and use them to find the BAF using Rastall parameter as [Formula: see text] and anisotropic parameter [Formula: see text] to meet the consistency with the experimental limit, see Fig. 3. For [Formula: see text], the anisotropic model reduces to the isotropic FRW model, where we have a zero BAF. Finally, we conclude that RTG with both universe models is a good candidate to study baryogenesis in the early universe and the variable [Formula: see text] has a considerable impact on the BAF.