NSW police have stumbled upon a shipping container with almost $600,000 worth of cannabis after a bushfire destroyed a house on the property on Saturday.

Emergency crews worked through the night in the Kremnos area, south of Grafton, on the weekend as a bushfire threatened dozens of homes across northern NSW.

Upon further inspection, police allegedly discovered 118 cannabis plants in a shipping container on a property in McGills Road with an estimated street value of $590,000.

A 68-year-old man was arrested and charged with cultivating cannabis for commercial use.