Due to its in-built ill-posed nature, image and video dehazing is an immensely thought-provoking problem, and it is an essential pre-processing step for various applications such as ADAS (automatic driver-assistance systems), security and surveillance, remote sensing, and long-range imaging. We proposed a novel single image and video dehazing method, called JA-dehaze, by using Jaya Algorithm (JA) to address this problem. The technique consists of three factors: Discrete Haar Wavelet Transform (DHWT) for sub-bands, local atmospheric light estimation and transmission map estimation and refinement using Jaya Algorithm. We formulated haze removal as an optimization problem, and the fitness function for the single image is taken from the information loss term, distance and the haze density term. The JA-dehaze method improves the gradient and preserves the information optimally by minimizing the fitness function. Furthermore, we extended the single image dehazing process to real-time video dehazing. Experimental results demonstrate that the proposed JA-dehaze method can successfully improve the quality of a foggy image without sacrificing color fidelity and can retain image details sufficiently.