Davies, 32, joined in 2015 and skippered the Staggies to League Cup final success in his debut season.
He lost the captaincy at the beginning of this term and was seeking a return to his native north-east of England, due to family matters.
But since then he has started all but one Premiership game for County.
"We are delighted that Andrew has chosen to extend his stay at the club," said County manager Jim McIntyre.
"Andrew's family are very settled and happy in the area now and it's a huge boost to have a player of his stature commit his future to the club for another two years.
"Since he arrived in Dingwall, Andrew has been first class for the team and probably one of the best and most consistent centre halves in the division."

The husband-and-wife team beat Christopher Coles and Sophie Brown 21-11 21-11 in the final in Derby.
It is the fourth occasion the top seeds have triumphed in the event overall, beating the record of Olympic silver medal-winning pair Nathan Robertson and Gail Emms, who won it three times.
Between them, the Adcocks have now won 10 English titles.
All five titles at the championships were won by the top seeds.
Rajiv Ouseph won his eighth men's singles title, beating Alex Lane 21-10 21-9, and in the women's final Fontaine Chapman triumphed after twice being a beaten finalist.  She beat training partner Chloe Birch 21-15 21-16.
In the men's doubles, Marcus Ellis and Christopher Langridge proved too strong for Peter Briggs and Tom Wolfenden with a 21-15 21-11 victory.
In the women's doubles, defending champions Heather Olver and Lauren Smith beat Brown and Kate Robertshaw in the closest final of the day, which ended 19-21 21-18 21-7.

Warren, 79, who started the Granada Television show when he was 24, died on 1 March after a short illness.
His coffin was carried into the cathedral by members of the cast, watched by the crowds outside.
Among those who attended the service were Julie Goodyear and William Roache, who has played Ken Barlow since the first episode in 1960.
Goodyear, famous for playing barmaid Bet Lynch, paid a heartfelt tribute to Warren, a friend of 50 years.
"We cried together and we laughed together," she said.
Canon Philip Barratt said all the hymns and readings at the funeral, which was also open to members of the public, were chosen by Warren.
"It's a big service for a very big character and a lovely part of the history of Manchester," he said.
Former stars in the congregation included Ken Morley, who played Reg Holdsworth, and Christopher Quinten, best known for his role as mechanic Brian Tilsley.
Warren was born Anthony McVay Simpson in Eccles, Salford, in 1937, and took the stage name of Warren during his career as a child star.
He trained at Liverpool's Elliott Clarke Theatre School and was a regular on the BBC radio show Children's Hour, before acting in radio plays alongside some of the actors who would became household names because of Coronation Street, including Violet Carson and Doris Speed.
His idea for the soap opera was commissioned for 13 episodes by Granada in 1960 and the show has gone on to be one of the UK's most successful ever, reaching viewing figures of 26.6 million for the departure of the much-loved character Hilda Ogden in 1987.
He wrote episodes for the ITV soap until the late 1970s and was made an MBE in 1994 for his services to television drama.
The writer remained a consultant on the soap until his death, with his creator credit appearing at the start of the closing credits of every episode.
Ross County defender Andrew Davies has signed a two-year contract extension, keeping him at the Dingwall club until the summer of 2019.
[NEXT_CONCEPT]
Chris and Gabby Adcock won the English National Championships mixed doubles title for the third successive year.
[NEXT_CONCEPT]
The funeral of Coronation Street creator and writer Tony Warren has taken place at Manchester Cathedral.