Using melamine as the precursor of g-C3N4 and expanded perlite (EP) as the carrier, a kind of floating g-C3N4/expanded perlite composites (CN/EP-x, where x was denoted as 1, 2, 4 and 6, respectively, corresponding to the mass ratio of melamine to EP 1:2, 2:1, 4:1 and 6:1) were synthesized by cooperating wet-chemistry method with a unique heat treatment schedule, which aimed to enhance the g-C3N4 loading ratio and construct a tightly interface between g-C3N4 and EP. The phase composition, microstructure, element composition, optical property, etc. of the g-C3N4/EP composites were investigated, and their photocatalytic performances vs. the mass ratio of melamine to EP (loading ratio of g-C3N4) were evaluated through photo-degrading Rhodamine B (RhB) aqueous solution. It is found that g-C3N4 immobilized on the surface or embedded into the open pores of EP, which were beneficial to the interface bonding strength between g-C3N4 and EP. With the increasing of the mass ratio of melamine, the loading ratio of g-C3N4 in CN/EP-x composite increased gradually, and the specific surface area of the composite increased step by step but then dropped for CN/EP-6 composite owing to the intensified agglomeration of g-C3N4 particles. The photocatalytic performance of CN/EP-x composites also improved gradually and achieved the optimum for the CN/EP-4 composite, then reduced for the CN/EP-6 composite. CN/EP-4 composite (0.35 g) degraded 94 % of RhB molecules (10 mg/L, 100 mL) after visible light illumination for 120 min. The reduced band gap, improved separation efficiency of holes and electrons, enhanced photo-current response, reduced electron transfer resistance, as well as the enhanced specific surface area were responsible for the optimum photocatalytic performance of CN/EP-4 composite. Moreover, CN/EP-4 composite exhibited excellent floating performance, stability and reusability. After four degradation cycles, the removal rate of RhB by CN/EP-4 composite still achieved 83 %. This work will provide a new insight into synthesizing floating composite photocatalysts for the future practical application.