What are the implications of artificial intelligence (AI) for corporate law? In this essay, we consider the trajectory of AI's evolution, analyze the effects of its application on business practice, and investigate the impact of these developments for corporate law. Overall, we claim that the increasing use of AI in corporations implies a shift from viewing the enterprise as primarily private and facilitative, towards a more public, and regulatory, conception of the law governing corporate activity. Today's AI is dominated by machine learning applications which assist and augment human decision-making. These raise multiple challenges for business organization, the management of which we collectively term ‘data governance'. The impact of today's AI on corporate law is coming to be felt along two margins. First, we expect a reduction across many standard dimensions of internal agency and coordination costs. Second, the oversight challenges — and liability risks — at the top of the firm will rise significantly. Tomorrow's AI may permit humans to be replaced even at the apex of corporate decision-making. This is likely to happen first in what we call ‘self-driving subsidiaries' performing very limited corporate functions. Replacing humans on corporate boards by machines implies a fundamental shift in focus: from controlling internal costs to the design of appropriate strategies for controlling ‘algorithmic failure', i.e. unlawful acts by an algorithm with potentially severe negative effects (physical or financial harm) on external third parties. We discuss corporate goal-setting, which in the medium term is likely to become the center of gravity for debate on AI and corporate law. This will only intensify as technical progress moves toward the possibility of fully self-driving corporations. We outline potential regulatory strategies for their control. The potential for regulatory competition weakens lawmakers' ability to respond, and so even though the self-driving corporation is not yet a reality, we believe the regulatory issues deserve attention well before tomorrow's AI becomes today's