Literally "to follow [the path of] the respectable."
良 here means
良民 ("law-abiding commoner"), the social class above
贱民 ("debased people," which in imperial China legally included entertainers, prostitutes, and slaves). The word survives mainly in historical fiction.