African swine fever (ASF) is a devastating infectious disease in swine that is severely threatening the global pig industry. An efficacious vaccine is urgently required. Here, we used the Chinese ASFV HLJ/18 as a backbone and generated a series of gene-deleted viruses. The virulence, immunogenicity, safety, and protective efficacy evaluation in specific-pathogen-free pigs, commercial pigs, and pregnant sows indicated that one virus, namely HLJ/18-7GD, which has seven genes deleted, is fully attenuated in pigs, cannot convert to the virulent strain, and provides complete protection of pigs against lethal ASFV challenge. Our study shows that HLJ/-18-7GD is a safe and effective vaccine against ASFV, and as such is expected to play an important role in controlling the spread of ASFV.