  Let $R$ be a commutative ring and $M$ be an $R$-module, and let $Z(M)$ be the
set of all zero-divisors on $M$. In 2008, D.F. Anderson and A. Badawi
introduced the regular graph of $R$. In this paper, we generalize the regular
graph of $R$ to the \textit{$M$-regular graph} of $R$, denoted by
$M$-$Reg(\Gamma(R))$. It is the undirected graph with all $M$-regular elements
of $R$ as vertices, and two distinct vertices $x$ and $y$ are adjacent if and
only if $x+y\in Z(M)$. The basic properties and possible structures of the
$M$-$Reg(\Gamma(R))$ are studied. We determine the girth of the $M$-regular
graph of $R$. Also, we provide some lower bounds for the independence number
and the clique number of the $M$-$Reg(\Gamma(R))$. Among other results, we
prove that for every Noetherian ring $R$ and every finitely generated module
$M$ over $R$, if $2\notin Z(M)$ and the independence number of the
$M$-$Reg(\Gamma(R))$ is finite, then $R$ is finite.
