 Our environment is in threat due to a variety of pollutants. One of the major causes of pollution is industrial wastewater leading to adverse effect on the existence of living organisms. In this scenario, certain metal and metal oxide nanoparticles have shown their ability as catalysts in degrading these organic pollutants. In the present study, tannic acid is used for the synthesis of nanostructured NiO and SnO2 which have the potential to act as nanocatalyst. As this synthesis technique does not involve any toxic chemicals, they are environmentally benign. The complexes formed are annealed at 873 K, as shown by TGA–DTG analysis, for 2 h to obtain pure NiO and SnO2 nanomaterials. The prepared nanomaterials are characterized using XRD, HRTEM, EDAX, UV–visible and FTIR spectra. The catalytic potential of both NiO and SnO2 are manifested by monitoring by the degradation of the heterocyclic aromatic dye methylene blue to leucomethylene blue using UV–visible spectrophotometer. The rate constant is found to be 0.0006 min−1 for the reaction unassisted by nano-catalyst. In the presence of nanostructured NiO and SnO2, the rate constants are 0.026 min−1 and 0.323 min−1, respectively, showing good catalytic potential for the synthesized nanomaterials.