The auto industry’s attempt to build small cars profitably in the U.S. has hit a pothole.

Ford Motor Co. said a Michigan factory that assembles its small Ford Focus and C-Max wagon will end production of those vehicles in 2018 in a new setback to efforts to create a market for small cars made in the U.S. Production of the Focus will be moved outside the U.S.

The...