This work reports the preparation of HZSM-5/SBA-15 micro-mesoporous materials with composite structure by mechanosynthesis and their use as templates to micro-mesoporous carbons, with palm oil cooking waste as carbon source. HZSM-5/SBA-15 composites were prepared in different mass proportions (25:75, 50:50 and 75:25) by a mechanosynthetic strategy. The palm oil waste was infiltrated into the template pores by a two-step procedure involving grinding followed by stirring the suspension in an oil solution and carbonization under inert atmosphere. SEM images showed the efficiency of mechanosynthesis for all mass proportions, while textural properties were strongly influenced by the presence of SBA-15. A comparison of 50% HZSM-5/SBA-15 mixture with pristine SBA-15 and uncalcined SBA-15 as carbon templates evidenced that the 50% HZSM-5/SBA-15 mixture lead to the carbon with the highest surface area and pore volume. The resulting carbon material was studied as adsorbent to different dye molecules, including molecules with different charges and sizes. Results revealed that the carbon has a significantly higher affinity for cationic dyes, that the mesopore structure favors high diffusion rates and that the surface groups have a very high affinity for cationic dye molecules.