In this paper, we consider G‐invex mathematical programming problems and show the efficiency of G‐invexity notion in proving optimality results for such nonconvex optimization problems. Further, we introduce a new exact penalty function method, called the l1 exact G‐penalty function method and use it to solve nonconvex mathematical programming problems with G‐invex functions. In this method, the so‐called exact G‐penalized optimization problem associated with the original optimization problem is constructed. The equivalence between the sets of optimal solutions of the original mathematical programming problem and of its associated G‐penalized optimization problem is established under suitable G‐invexity assumptions. Also lower bounds on the penalty parameter are given, for which above this result is true. It turns out that, for some nonconvex optimization problems, it is not possible to prove the same result for the classical l1 penalty function method under invexity assumption.