Let D be a division algebra, finite-dimensional over its center, and R=D[t;σ,δ] a skew polynomial ring. Using skew polynomials f∈R, we construct division algebras and a generalization of maximum rank distance codes consisting of matrices with entries in a noncommutative division algebra or field. These include a class of codes constructed by Sheekey (in particular, generalized Gabidulin codes), as well as Jha Johnson semifields.