A Nonlinear Model Predictive Control (NMPC) approach for automatically computing exogenous insulin dosage in type 1 diabetes mellitus (T1DM) is proposed. The NMPC law, regulates blood-glucose level to a desired predefined zone by enforcing control signal constraint and output constraints to be satisfied in a nonlinear optimization framework. The major innovation is utilizing quadratic cost function and discrete control signal constraints in the NMPC problem formulation. The proposed approach improves blood glucose regulation by solving a nonlinear programming problem with practical constraints in order to apply insulin during special periods of time and avoid the hyperglycemia and hypoglycemia conditions. The proposed controller can compute exogenous insulin dosages for each patient, based on the patients' condition such as exercise, fatigue and stress. The suggested NMPC merits are evaluated by in-silico studies for several scenarios for different patient's condition.