NuCoal Resources says it was taken to the Land and Environment Court by Jerry Plains farmer Ian Moore, who had refused to let the miner onto his land despite repeated attempts at arbitration.
At a special sitting of the court in Singleton on Tuesday, Justice Peter Biscoe granted the company access to drill three exploration holes on part of Mr Moore's 184 hectare farm.
NuCoal spokesman Patrick Southam described the outcome, which he said was agreed to by Mr Moore, as a win for common sense.
Peter Long, the lawyer for Mr Moore, said the court had made an order in favour of the company but Mr Moore had agreed to it because the judge had also addressed his concerns about drilling taking place through their groundwater.
"They would have preferred that no mining was on their land," Mr Long told AAP.