Scotland’s Court of Sessions in Edinburgh ruled that the proposed move was within the power of Scottish ministers.
In a statement, the Court of Sessions said: "The court ruled that the Acts of Union were not an impediment to the minimum pricing measures.
"The court also decided that the measures were not incompatible with EU law. It held that in so far as the measures had equivalent effect to quantitative restrictions on imports, they were justified on the grounds of the protection of the life and health of humans."
It said national authorities "retained competence" to introduce minimum pricing "notwithstanding the fact that there had been a degree of EU common organisation of the market in respect of wine, other fermented products, and agriculturally produced ethyl alcohol". The measures were not prohibited by, nor did they undermine, that regulation.
"The court was satisfied that it was unnecessary and inappropriate to refer any question of EU law to the Court of Justice for a preliminary ruling."
The legal action against plans to introduce a 50p-per-unit minimum price was brought by the Scotch Whisky Association, the European Spirits Association and Comite European Des Enterprises Vins, a representative body for the European Union wine industry and trade.
Gavin Hewitt, chief executive of the SWA, said: “We are disappointed our petition for judicial review has been refused. We are surprised at the ruling in light of 30 years of European case law on minimum unit pricing (MUP). We will be appealing against this decision and we remain confident of our position.
“The view from Europe is very different to that expressed by the court and we are not alone in having concerns about the legality of MUP. The European Commission and more than 10 member states have expressed their concerns that MUP contravenes European Union trading rules and their opposition to the Scottish proposals.
“We have consistently opposed MUP so our decision to appeal should not come as a surprise. The Scottish Government has agreed to not introduce MUP until the legal process, including appeals, is complete.”
In a statement, Scotland’s Health Secretary Alex Neil said: “We welcome today’s favourable opinion from the Court of Session on minimum unit pricing of alcohol. We have always believed minimum unit pricing is the right thing to do to tackle Scotland’s problematic relationship with alcohol.
“Minimum unit pricing will target cheap alcohol relative to strength that is favoured by hazardous and harmful drinkers and which contributes to much of the alcohol-related harm we see in Scotland.
“We now look forward to being able to implement minimum unit pricing and making that transformational change in Scotland’s relationship with alcohol.”
Miles Beale, Chief Executive of the Wine and Spirit Trade Association said: “While this decision is disappointing, it is just the first step in a long legal process. The Scotch Whisky Association’s decision to appeal is the right one and we support it. “We are particularly concerned that the Judge has failed to refer this matter to the European Court of Justice. The European Commission and some 10 Member States have expressed their concerns about the legality of MUP under EU law.
“Minimum unit pricing is an ineffective measure which will punish the majority of responsible drinkers through higher prices, particularly those on the lowest incomes. If MUP is introduced in Scotland, the UK risks retaliatory action that would undermine the UK’s wine and spirit sector - which is worth £37 billion to the UK economy. It would also put at risk over 2 million UK jobs.
“While legal action is likely to go on for many months the industry remains committed to making real and measurable progress to reducing alcohol related harm in Scotland through the Scottish Government Alcohol Industry Partnership and the Public Health Responsibility Deal.”
Association of Licensed Multiple Retailers strategic affairs director said: "Today's announcement moves a step closer to bringing some much needed clarity to this debate - minimum pricing may be legal in some circumstances. But equally this is far from the end of the story.
"The judgement will be appealed and is likely to be taken all the way to Europe - and publicans know only too well from the satellite debate that it can be a long and tortuous process with built in uncertainty. All of this just stymies positive measures to tackle the real problem - the easy access to pocket money priced alcohol in the off trade.
"Whatever side of the MUP debate you are on, we all agree on the need to re-regulate the supermarkets and today's news will probably delay that."