Objectives Lightning can be extremely harmful to ships on the open seas. Especially with the large-scale application of electronic and electrical equipment and closed integrated masts, the lightning indirect effect on ships is becoming increasingly serious. In order to effectively carry out the lightning indirect effect test for shipborne electrical and electronic equipment, Methods a kind of nearby lightning-electric field environment simulator based on the principle of Marx generator was designed and realized in this paper. The simulator realized the peak cut-off of the impact high voltage by using the adjustable single chopping sphere gap, and established a simulated nearby lightning-electric field environment through the high voltage plate and the conductive ground plane. Results The test results show that the device has a cut-off time of less than 2 μs and a drop time of less than 0.09 μs, which can produce a pulsed electric field environment that meets the requirements of GJB 1389A-2005. Conclusions This paper can provide equipment support for the research on the indirect effect of the nearby lightning strokes on system electronic and electrical equipment based on GJB 8848-2016.