Assuming you're trying to get all 1,000,000 rows of data in at once, I think it's safe to say your task is virtually impossible. At minimum, you'll break the following governor limits: maximum CPU time, maximum heap, maximum callout size. Even running it as a batch process (which has relaxed governor limits), you'll still most likely exceed the heap limit, and you'd still need to iterate several times to avoid the callout limits.
However, you could write a batch process to handle iterating through all of the values in the external system, writing them to the database, then trying to run a report where you export all of the saved data to a CSV file, or using the Apex Data Loader to export the data.
Alternatively, you could try to perform the callouts directly from the client (the browser), assemble the file into a huge string, and convert it to a data-uri, which would allow users to download the file, assuming it was supported (all modern browsers supported by salesforce.com should allow such a download). Expect terrible performance. Either way, you'll have to page through the data in pieces rather than trying to get all the records all at once.