A search for CP violation in charmless four-body decays of Λb0 and Ξb0 baryons with a proton and three charged mesons in the final state is performed. To cancel out production and detection charge-asymmetry effects, the search is carried out by measuring the difference between the CP asymmetries in a charmless decay and in a decay with an intermediate charmed baryon with the same particles in the final state. The data sample used was recorded in 2011 and 2012 with the LHCb detector and corresponds to an integrated luminosity of 3fb-1. A total of 18 CP asymmetries are considered, either accounting for the full phase space of the decays or exploring specific regions of the decay kinematics. No significant CP-violation effect is observed in any of the measurements.