Electric-motorcycle maker Zero Motorcycles Inc. is recalling certain S and DS bikes from the 2012 model year to fix an electronic problem that can cause their electric motors to suddenly lose power.

In a document filed with the National Highway Traffic Safety Administration the Scotts Valley, Calif., company said the affected vehicles have motor encoder position signals that may drift, or change over time.

If...