A law firm is moving its Monmouth County headquarters after acquiring a 20,000-square-foot office building in Marlboro.