We report on fabrication of microresonators of high quality (high-Q) factors in both glass and crystalline materials by femtosecond laser 3D micromachining. Based on this novel approach, we obtained high-Q microresonators of non-inplane geometries in glass materials such as fused silica and Nd: glass and demonstrated lasing at a pump power as low as 69 microwatts. We also fabricated on-chip microresonators of sub-100 μm diameters in crystalline materials including calcium fluoride and lithium niobate, and demonstrated efficient second harmonic generation using the high-Q lithium niobate microresonator. Furthermore, femtosecond laser 3D micromachining allows direct integration of the microresonators with other functional microcomponents, such as a microfluidic mixer and a microheater, leading to compact microdevices with enhanced functionalities. Our technique opens new avenues for fabricating high-Q microresonators with either 2D or 3D geometries on various types of dielectric materials.