early 15c., "to scatter, disperse (as the wind does)," from Latin ventilatus, past participle of ventilare "to brandish, toss in the air, winnow, fan, agitate, set in motion," from ventulus "a breeze," diminutive of ventus "wind" (from PIE *wē-nt-o‑ "blowing," suffixed (participial) form of root *we- "to blow").
Original notion is of cleaning grain by tossing it in the air and letting the wind blow away the chaff. Meaning "supply a room with fresh air" first recorded 1743, a verbal derivative of ventilation. Formerly with diverse slang senses, including "shoot" (someone), recorded from 1875, on the notion of "make holes in." Related: Ventilated; ventilating.
"to convict quickly and perhaps unjustly," 1873, American English, from railroad (n.) as the then-fastest form of travel.
A person knowing more than might be desirable of the affairs, or perhaps the previous life of some powerful individual, high in authority, might some day ventilate his knowledge, possibly before a court of justice; but if his wisdom is railroaded to State's prison, his evidence becomes harmless. ["Wanderings of a Vagabond," New York, 1873]
Related: Railroaded; railroading. An earlier verb sense was "to have a mania for building railroads" (1847).