This chapter systematically explores the challenges of data security and legal issues in the application of medical big data. As the application of medical big data expands from clinical diagnostics to drug development, it holds vast potential for growth. However, numerous issues regarding data security and legal ethics also arise. The chapter begins with an overview of the current state of medical big data applications and introduces their applications across various medical fields. It then delves into the various challenges faced in data security. In terms of law and ethics, the chapter discusses the conflict between data ownership and data sharing, introduces international legal frameworks, and examines issues related to artificial intelligence and ethics. Through detailed case studies, this chapter analyzes medical data breach incidents and summarizes the impact of these events and their common security challenges. The intention of this chapter is to guide the secure and lawful use of medical big data while protecting patient privacy and data integrity.