Health Secretary Alex Neil said the contest was an "excellent opportunity" for catering staff to show what they could do.
Cooks will have to produce Scottish-themed meals for the NHS Good Food Challenge 2014, with the dishes to be judged on how healthy they are and their use of fresh, local ingredients.
As hospitals have to serve large numbers of patients, the cooks will be expected to produce as many as 50 servings of their dish.
Local health boards are being invited to enter teams of catering staff, who will take part in regional heats over the summer, before the grand final is held this autumn, with the winning menu to be produced in hospitals across the country.
Launching the contest, Mr Neil said: "Scotland is known as a land of food and drink with some of the best natural produce in the world.
"Despite this, Scotland still has one of the poorest diet-related health records in the developed world.
"Whatever the reasons for our dietary habits, the Scottish Government is determined that our culture must change if we are to prosper as a nation.
"That is why we are taking a range of steps to help people make better food choices, taking account of food's healthiness, quality, seasonality and freshness.
"As part of this work I want all patients to receive tasty, nutritious food when they are in hospital."
He added: "We have already made huge progress in our NHS, with our nutritional database helping health boards to analyse recipes and ensure meals are nutritionally balanced and match patients' individual needs.
"The NHS Good Food Challenge 2014 is an excellent opportunity for our committed catering teams to show what they can deliver and to come up with new recipes that are tasty, healthy and can be shared across the NHS."
Since 2008 the Scottish Government has committed more than £31.65 million to support and improve nutritional care, including screening patients for malnutrition when they enter hospital and the introduction of "nutrition champions" in every health board area.
Scotland was the first country in the UK to develop clinical standards for food, fluid and nutrition care in hospitals, and to make screening for malnutrition a mandatory requirement.
Ian Crichton, chief executive of NHS National Services Scotland, said: "We work with NHS boards to check their performance against the nutritional standards, auditing them every six months.
"If any issues show up, we send our catering team to the hospital to help them make the required changes to help them improve.
"We have also rolled out a nutrition database to enable individual NHS boards to record data and information, and produce reports on their patient catering recipes.
"This will ensure that the food they offer is nutritionally-balanced and healthy, that recipes can be shared across Scotland and special requirements, such as textured food, or energy dense meals, can be handled."