This study investigates frequency domain quantile dependence and connectedness between crude oil and exchange rate markets of oil-importing and oil-exporting countries. The quantile cross-spectral and quantile frequency connectedness approaches are employed to examine the risk propagation mechanisms considering market states and investment cycles. Our empirical results are as follows. First, exchange rates strongly depend on oil price shocks on long-term scales, especially for oil exporters. Second, most oil-exporting countries' currencies are the risk transmitters, whereas oil and currencies of oil-importing economies act as risk receivers. Third, there are excess spillovers across frequency bands at the extreme quantiles. Finally, major crisis events reinforce the risk spillover strength. Changes in the connectedness between oil and the ruble during the Russian-Ukrainian conflict are documented. Overall, quantile and frequency domain information is helpful for investors in asset allocation and exchange rate regulators in developing prudent monetary policies against extreme oil price shocks.