Generative AI is a technology that can be used to autonomously generate new content,which is widely used in the fields of text,image,audio,video,etc.This paper explores the application of generative AI in cyberse-curity teaching.It introduces the potential of generative AI in teaching.Then,through specific examples,it ex-plores the practical application of generative AI in generating teaching PPT,making teaching design,cybersecu-rity defense teaching,cyber attack teaching,etc.Finally,it analyzes the challenges faced by cybersecurity teach-ing based on generative AI technology.