The Yankees made the moves before Tuesday night's game against Tampa Bay. Ramirez took the loss Monday night, giving up the go-ahead run in the 12th inning to the Rays.
The 32-year-old Miller pitched in one game for the Yankees last year. He's also played for Baltimore, Colorado and Oakland.
Miller was 4-2 with two saves and a 2.85 ERA at Triple-A Scranton/Wilkes-Barre.
Ramirez was 0-2 with a 5.40 ERA in eight games with the Yankees.
The Yankees also transferred pitcher CC Sabathia to the 60-day DL. The lefty is set to make his second rehabilitation start Wednesday night for Double-A Trenton.
Sabathia has been out since May 11 because of inflammation in his right knee. He started Saturday for Class A and pitched 2 1/3 innings.