As militaries progressively utilise the cyber realm and their networks and systems come under attack, artificial intelligence (AI) will play an increasingly important role in defending against those attacks and in the execution of future military cyber operations. Offensive cyber operations are also made more effective by the inclusion of elements of AI, whether in reconnaissance, access and penetration of targets, command and control, or the deployment of a payload or other actions on the targeted system or network. This chapter explores some of the legal and ethical frameworks associated with the military use of autonomous cyber capabilities. This chapter aims at providing a critical overview of the ethical, legal, and political aspects of the current and projected use of AI in cyber operations in both offensive and defensive operations.