The practice of medicine increasingly relies on machine intelligence. Most of the existing technology functions as tools to support human activity, but some emerging uses are much more complex. Automation of complicated tasks requires greater autonomy and better decision-making skills. When lives are on the line, decisions made by machine intelligence must conform to the highest standards of utility and ethical behavior. We discuss some of the near-future medical applications of machine intelligence, and how we can ensure the ethical operation of these devices. We conclude with a review of ethical philosophies that might be used to inform machine medical ethics and the artificial intelligence techniques by which they might be implemented.