A rotation system is a combinatorial description of a graph and its embedding in a 2-dimensional manifold defined by two permutations on a set of objects. We instantiate this set of objects with Majorana operators and define a Majorana code by associating stabilizers to vertices and faces of the graph embedding. We show how the resulting Majorana code corresponds to a qubit stabilizer code that generalizes the known constructions of rotated and twisted surface codes. While we obtain similar macroscopic behavior -- for instance, anyon type changing when crossing defect lines -- the microscopic details of our codes can lead to improved code parameters. For instance, we identify the [[5,1,3]] code as the smallest member of a surface code family on the torus. We find other code families (both in the plane and on higher genus surfaces) improving upon the constants in the Bravyi-Poulin-Terhal bound.