Lee agreed to a "consensual resolution" with CNSW, which will see him join a new sub-committee of their board to address future issues regarding the direction of the state's cricket.
Last week, 36-year-old Lee spoke out about NSW's poor showing at state level and suggested Gilbert should have been sacked rather than coach Anthony Stuart, who was given the axe halfway through the last year of his contract.
A statement from the state team's board said: "Cricket New South Wales confirms that the conduct charges against Brett Lee have been withdrawn.
"Both parties acknowledge that there is a code of conduct in place and to which all contracted players must adhere.
"Cricket New South Wales and Brett Lee are pleased to state that they have arrived at a consensual resolution of the matter, including that Cricket New South Wales will immediately establish a sub-committee of its board to which Brett Lee will be invited to contribute to address issues as to the future direction of cricket in New South Wales.
"Both parties are very pleased to have found a way forward and at having arrived at a very positive mutual outcome.
"Brett Lee looks forward very much to working constructively with Cricket New South Wales into the future."
The state's Twenty20 side Sydney Thunder remain winless in this year's Big Bash League, while key players Phil Hughes and Usman Khawaja have left the state's set-up in recent seasons.