This article explores the potential ethical hazards of artificial intelligence (AI) on society from an ethical perspective. We introduce the development and application of AI, emphasizing its potential benefits and possible negative impacts. We particularly examine the application of AI in the medical field and related ethical and legal issues, and analyze potential hazards that may exist in other areas of application, such as autonomous driving, finance, and security. Finally, we offer recommendations to help policymakers, technology companies, and society as a whole address the potential hazards of AI. These recommendations include strengthening regulation and supervision of AI, increasing public understanding and awareness of AI, and actively exploring how to use the advantages of AI to achieve a more just, equal, and sustainable social development. Only by actively exploring the advantages of AI while avoiding its negative impacts can we better respond to future challenges.