The deputy general counsel of Exxon Mobil Corp. has been elected by the company's board of directors to replace general counsel Randall Ebner when he retires in November, the company announced Thursday.