The RE5Pd2In4 (RE = Tb-Tm) compounds crystallize with the orthorhombic Lu5Ni2In4-type crystal structure (Pbam space group). In this work we report results of structural and magnetic studies by means of X-ray and neutron diffraction as well as dc and ac magnetometric data. Magnetic susceptibility and neutron diffraction data revealed rare-earth moments order at low temperatures with complex magnetic structures showing a cascade of temperature-induced transitions. The magnetic ordering temperatures are found to be 97, 88, 28.5, 16.5 and 4.3 K for RE = Tb, Dy, Ho, Er and Tm, respectively. Magnetic structures related to the propagation vector k→1=[0,0,0] are found just below the magnetic ordering temperatures in majority of the investigated compounds (RE = Tb-Er). Below the Curie temperature TC they have purely ferromagnetic character in Tb5Pd2In4 and Dy5Pd2In4. A ferrimagnetic order finally sets at lower temperatures in Dy5Pd2In4, while in Ho5Pd2In4 two magnetic phases related to k→1 are observed: the antiferromagnetic one (phase I) and the ferrimagnetic one (phase II, coexisting with phase I at lower temperatures). Er5Pd2In4 is a canted antiferromagnet with additional ferromagnetic component developing at lower temperatures. A purely antiferromagnetic component of magnetic structure with enlarged magnetic unit cell appears with decreasing temperature in Tb5Pd2In4 (k→2=[0,12,0] and k→3=[0,12,12]) while in Ho5Pd2In4 such component (k→4=[14,0,0]) is present within whole temperature range below the magnetic ordering temperature. Magnetic structure of Tm5Pd2In4, exceptionally, has no k→1 component, but is an antiferromagnetic incommensurate one related to two propagation vectors: k→5=[0.073(3),0.451(1),12] and k→6=[0,0.335(2),12]. In majority of the compounds (RE = Tb-Er) the first rare-earth 4g site (noted as 4g1) orders at lower temperature than two remaining sites (2a and 4g2). The direction of the magnetic moments depends on rare-earth element involved and indicates an influence of single-ion anisotropy in the crystalline electric field (CEF).