Fog computing is an interesting technology aimed at providing various processing and storage resources at the IoT networks’ edge. Energy consumption is one of the essential factors that can directly impact the maintenance cost and CO2 emissions of fog environments. Energy consumption can be mitigated by effective scheduling approaches, in which tasks are going to be mapped on the best possible resources regarding some conflicting objectives. To deal with these issues, we introduce an opposition-based hybrid discrete optimization algorithm, called DMFO-DE. For this purpose, first, a discrete and Opposition-Based Learning (OBL) version of the Moth–Flame Optimization (MFO) algorithm is provided, and it then is combined with the Differential Evolution (DE) algorithm to improve the convergence speed and prevent local optima problem. The DMFO-DE is then employed for scientific workflow scheduling in fog computing environments using the Dynamic Voltage and Frequency Scaling (DVFS) method. The Heterogeneous Earliest Finish Time (HEFT) algorithm is used to find the tasks execution order in the scientific workflows. Our workflow scheduling approach mainly tries to decrease the scheduling process’s energy consumption by minimizing the applied Virtual Machines (VMs), makespan, and communication between dependent tasks. For evaluating the performance of the proposed scheduling scheme, extensive simulations are conducted on the scientific workflows with four different sizes. The experimental results indicate that scheduling using the DMFO-DE algorithm can outperform other metrics such as the number of applied VMs, and energy consumption.