We develop DeepOPF as a Deep Neural Network (DNN) approach for solving security-constrained direct current optimal power flow (SC-DCOPF) problems, which are critical for reliable and cost-effective power system operation. DeepOPF is inspired by the observation that solving the SC-DCOPF problem for a given power network is equivalent to depicting a highdimensional mapping between load inputs and generation and phase-angle outputs. We first construct and train a DNN to learn the mapping between the load inputs and the generations. We then directly compute the phase angles from the generations and loads by using the (linearized) power flow equations. Such a two-step procedure significantly reduces the dimension of the mapping to learn, subsequently cutting down the size of the DNN and the amount of training data/time needed. We further characterize a condition that allows us to tune the size of our neural network according to the desired approximation accuracy of the load-to-generation mapping. Simulation results of IEEE test cases show that DeepOPF always generates feasible solutions with negligible optimality loss, while speeding up the computing time by up to 400x as compared to a state-of-the-art solver.1 There are two types of SC-DCOPF problems, namely the preventive SC-DCOPF problem and the corrective SC-DCOPF problem. In the preventive SC-DCOPF problem, the system operating decisions cannot change once they are determined, thus they need to guarantee feasibility under both the preand post-contingency constraints. For the corrective SC-DCOPF problem, the system operator can have a short time (e.g., 5 minutes) [12] to adjust the operating points after the occurrence of each contingency. Our DeepOPF approach is applicable to both problems. We focus on the preventive SC-DCOPF problem in this paper for easy illustration.