Apple Inc. has hired legal heavyweights Theodore Olson and Theodore Boutrous to fight a court order that it assist the Federal Bureau of Investigation in unlocking an iPhone as part of the investigation into the San Bernardino, Calif., terror attack.

Mr. Olson, a former Solicitor General, is best known for representing George W. Bush in the contested 2000 election against former Vice President Al Gore that was ultimately decided by the Supreme Court. In 2009, Mr. Olson, a conservative, joined with with his opposing counsel...